[tests] Fix DPMAregister test cases #85
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: Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allow job to be triggered manually. | |
workflow_dispatch: | |
# Cancel in-progress jobs when pushing to the same branch. | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
tests-backend: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ | |
'ubuntu-20.04', | |
# Don't use macOS for now, it is currently unstable, otherwise slow. -- 2022-04-19, amo | |
# 'macos-latest', | |
] | |
python-version: ['2.7'] | |
defaults: | |
run: | |
shell: bash | |
env: | |
OPS_API_CONSUMER_KEY: ${{ secrets.OPS_API_CONSUMER_KEY }} | |
OPS_API_CONSUMER_SECRET: ${{ secrets.OPS_API_CONSUMER_SECRET }} | |
IFICLAIMS_API_URI: ${{ secrets.IFICLAIMS_API_URI }} | |
IFICLAIMS_API_USERNAME: ${{ secrets.IFICLAIMS_API_USERNAME }} | |
IFICLAIMS_API_PASSWORD: ${{ secrets.IFICLAIMS_API_PASSWORD }} | |
name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }} | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v3 | |
- name: Install dependencies for Linux | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt install --yes pdftk poppler-utils | |
- name: Install dependencies for macOS | |
if: runner.os == 'macOS' | |
run: | | |
brew install poppler | |
- name: Configure policy for ImageMagick | |
# https://stackoverflow.com/q/52998331 | |
# https://stackoverflow.com/a/57721936 | |
if: runner.os == 'Linux' | |
run: | | |
sudo rm /etc/ImageMagick-6/policy.xml | |
- name: Setup Python | |
uses: MatteoH2O1999/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
cache: 'pip' | |
cache-dependency-path: 'setup.py' | |
- name: Setup project | |
run: | | |
pip install virtualenv | |
make setup-test | |
- name: Run tests | |
run: make test-coverage options="--app-cache-backend=memory" | |
- name: Upload coverage results to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
tests-docs: | |
runs-on: "ubuntu-20.04" | |
defaults: | |
run: | |
shell: bash | |
name: Build documentation | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: MatteoH2O1999/setup-python@v1 | |
with: | |
python-version: '2.7' | |
architecture: 'x64' | |
cache: 'pip' | |
cache-dependency-path: 'requirements-docs.txt' | |
- name: Invoke Sphinx | |
run: | | |
pip install virtualenv | |
make docs-html | |
tests-ui: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ | |
'ubuntu-20.04', | |
# Don't use macOS for now, it is currently unstable, otherwise slow. -- 2022-04-19, amo | |
# 'macos-latest', | |
] | |
node-version: ['11'] | |
defaults: | |
run: | |
shell: bash | |
name: Node.js ${{ matrix.node-version }} on OS ${{ matrix.os }} | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
architecture: x64 | |
cache: 'yarn' | |
cache-dependency-path: 'yarn.lock' | |
- name: Setup project | |
run: yarn install | |
- name: Run build | |
run: yarn build |