From 61f3a9f139fc02d88aab9ef9174ae1a97acf8361 Mon Sep 17 00:00:00 2001 From: Nat Noordanus Date: Fri, 10 Jun 2022 22:29:34 +0200 Subject: [PATCH] Update ci config --- .github/workflows/ci.yml | 57 ++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 862eda15e..616b37e38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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