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 b8f82cb
Showing 1 changed file with 22 additions and 45 deletions.
67 changes: 22 additions & 45 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,20 +58,16 @@ 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
with:
python-version: 3.7

- 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

- name: Build package
run: poetry build
Expand Down

0 comments on commit b8f82cb

Please sign in to comment.