Trigger CI #596
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "Test" | |
on: | |
pull_request: | |
push: | |
branches: | |
- "qa/**" | |
- "stable/**" | |
- "dev/trigger-ci" | |
jobs: | |
test: | |
name: "Test ${{ matrix.name }}" | |
runs-on: "ubuntu-20.04" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "py36" | |
python-version: "3.6" | |
toxenv: "py36" | |
coverage: true | |
- name: "migrations" | |
python-version: "3.6" | |
toxenv: "migrations" | |
coverage: false | |
steps: | |
- name: "Check out repository" | |
uses: "actions/checkout@v3" | |
- name: "Set up Python ${{ matrix.python-version }}" | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: "Install OS packages" | |
run: | | |
sudo apt-get --quiet update | |
sudo apt-get install --quiet --yes build-essential \ | |
libmysqlclient-dev libsasl2-dev libldap2-dev libssl-dev \ | |
p7zip-full unar | |
- name: "Create directories needed by test_duracloud.py" | |
run: | | |
sudo mkdir -p /var/archivematica/storage_service | |
sudo chown -R $USER /var/archivematica/storage_service | |
- name: "Get pip cache dir" | |
id: "pip-cache" | |
run: | | |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
- name: "Cache pip packages" | |
uses: "actions/cache@v3" | |
with: | |
path: "${{ steps.pip-cache.outputs.dir }}" | |
key: "${{ runner.os }}-pip-${{ hashFiles('**/requirements/test.txt') }}" | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: "Install tox" | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: "Run tox" | |
if: "! matrix.coverage" | |
env: | |
TOXENV: ${{ matrix.toxenv }} | |
PYTEST_ADDOPTS: -vv | |
run: | | |
tox | |
- name: "Run tox with coverage" | |
if: "matrix.coverage" | |
env: | |
TOXENV: ${{ matrix.toxenv }} | |
PYTEST_ADDOPTS: -vv --cov storage_service --cov-config=.coveragerc --cov-report xml:coverage.xml | |
run: | | |
tox | |
- name: "Upload coverage report" | |
if: matrix.coverage && github.repository == 'artefactual/archivematica-storage-service' | |
uses: "codecov/codecov-action@v3" | |
with: | |
files: ./coverage.xml | |
fail_ci_if_error: true | |
verbose: true | |
name: ${{ matrix.name }} | |
flags: ${{ matrix.name }} | |
integration: | |
name: "Integration" | |
runs-on: "ubuntu-22.04" | |
steps: | |
- name: "Check out repository" | |
uses: "actions/checkout@v3" | |
- name: "Run tests" | |
run: | | |
./run.sh | |
shell: "bash" | |
working-directory: "integration" | |
env: | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
DOCKER_BUILDKIT: 1 | |
PYTEST_ADDOPTS: -vv | |
linting: | |
name: "Lint" | |
runs-on: "ubuntu-22.04" | |
steps: | |
- name: "Check out repository" | |
uses: "actions/checkout@v3" | |
- name: "Set up Python 3.8" | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: "3.8" | |
- name: "Install tox" | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
- name: "Run tox" | |
run: | | |
tox -e linting |