Skip to content

Skip remote tests in CI (#75) #123

Skip remote tests in CI (#75)

Skip remote tests in CI (#75) #123

Workflow file for this run

name: Tests
on:
push:
# branches:
# - master
paths-ignore:
- '**.md'
- '**.ipynb'
- 'resources/**'
- 'studies/**'
- 'image/**'
## Unable until the repo began public
#pull_request:
# paths-ignore:
# - '**.md'
# - '**.ipynb'
# - 'resources/**'
# - 'studies/**'
# - 'image/**'
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run styles check
run: tox -elint
ecosystem-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Validate ecosystem.json
run: tox -eecosystem
tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Set up tox env
run: |
pver=${{ matrix.python-version }}
tox_env="-epy${pver/./}"
echo tox_env
echo TOX_ENV=$tox_env >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Test using tox envs
env:
QS_TOKEN: ${{ secrets.QUANTUM_SERVICES_TOKEN }}
run: |
tox ${{ env.TOX_ENV }}
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run coverage
env:
QS_TOKEN: ${{ secrets.QUANTUM_SERVICES_TOKEN }}
run: |
tox -ecoverage
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run black
run: tox -eblack