Skip to content

Commit

Permalink
Update ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n committed Jun 10, 2022
1 parent 515467e commit 61f3a9f
Showing 1 changed file with 19 additions and 38 deletions.
57 changes: 19 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,18 @@ on: [push, pull_request]
jobs:

code-quality:
runs-on: ubuntu-latest

name: Check coding standards

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- uses: actions/checkout@v3

- name: Install poetry
shell: bash
run: |
python -m pip install poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
run: pipx install poetry

- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: poetry

- name: Install dependencies
run: poetry install
Expand All @@ -43,32 +34,22 @@ jobs:
run: poetry run poe check-docs

run-tests:
runs-on: ${{ matrix.os }}-latest

name: Run tests

strategy:
matrix:
os: [Ubuntu, MacOS, Windows]
python-version: ['3.7', '3.8', '3.9', '3.10']

runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- uses: actions/checkout@v3

- name: Install poetry
shell: bash
run: |
python -m pip install poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
run: pipx install poetry

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry

- name: Install dependencies
run: poetry install
Expand All @@ -77,12 +58,12 @@ jobs:
run: poetry run pytest -v

build-release:
name: Build and release
runs-on: ubuntu-latest
needs: [code-quality, run-tests]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.7

Expand Down

0 comments on commit 61f3a9f

Please sign in to comment.