Skip to content

gh-actions: shellcheck clean #852

gh-actions: shellcheck clean

gh-actions: shellcheck clean #852

Workflow file for this run

name: Continuous integration tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tox:
name: CI tests via Tox
runs-on: ubuntu-22.04
strategy:
matrix:
py-ver-major: [3]
py-ver-minor: [8, 9, 10, 11, 12]
step: [lint, unit, bandit, mypy]
env:
py-semver: ${{ format('{0}.{1}', matrix.py-ver-major, matrix.py-ver-minor) }}
TOXENV: ${{ format('py{0}{1}-{2}', matrix.py-ver-major, matrix.py-ver-minor, matrix.step) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Singularity
if: ${{ matrix.step == 'unit' || matrix.step == 'mypy' }}
run: |
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.11.4/singularity-ce_3.11.4-jammy_amd64.deb
sudo apt-get install -y ./singularity-ce_3.11.4-jammy_amd64.deb
- name: Set up Python
uses: actions/setup-python@v5
with:
allow-prereleases: true
python-version: ${{ env.py-semver }}
cache: pip
cache-dependency-path: |
requirements.txt
tox.ini
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install "tox<4" "tox-gh-actions<3"
- name: MyPy cache
if: ${{ matrix.step == 'mypy' }}
uses: actions/cache@v4
with:
path: .mypy_cache/${{ env.py-semver }}
key: mypy-${{ env.py-semver }}
- name: Test with tox
run: tox
- name: Upload coverage to Codecov
if: ${{ matrix.step == 'unit' }}
uses: codecov/codecov-action@v4.3.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
tox-style:
name: CI linters via Tox
runs-on: ubuntu-22.04
strategy:
matrix:
step: [lint-readme, pydocstyle]
env:
py-semver: "3.12"
TOXENV: ${{ format('py312-{0}', matrix.step) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.py-semver }}
cache: pip
- name: Upgrade setuptools and install tox
run: |
pip install -U pip setuptools wheel
pip install "tox<4" "tox-gh-actions<3"
- if: ${{ matrix.step == 'pydocstyle' && github.event_name == 'pull_request'}}
name: Create local branch for diff-quality for PRs
run: git branch ${{github.base_ref}} origin/${{github.base_ref}}
- name: Test with tox
run: tox
release_test:
name: cwl-utils release test
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Singularity
run: |
wget --no-verbose https://github.com/sylabs/singularity/releases/download/v3.10.4/singularity-ce_3.10.4-jammy_amd64.deb
sudo apt-get install -y ./singularity-ce_3.10.4-jammy_amd64.deb
- name: pull some containers
run: |
export CWL_SINGULARITY_CACHE=$GITHUB_WORKSPACE/singularity_cache
mkdir -p "${CWL_SINGULARITY_CACHE}"
singularity pull --name "${CWL_SINGULARITY_CACHE}/node_alpine.sif" docker://docker.io/node:alpine
ls -lh "${CWL_SINGULARITY_CACHE}"
echo "${CWL_SINGULARITY_CACHE}"
echo "CWL_SINGULARITY_CACHE=${CWL_SINGULARITY_CACHE}" >> "$GITHUB_ENV"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: |
requirements.txt
test-requirements.txt
- name: Install packages
run: |
pip install -U pip setuptools wheel
pip install virtualenv
- name: Release test
env:
RELEASE_SKIP: head
run: ./release-test.sh