Skip to content

Commit

Permalink
ci: update actions to ubuntu-latest
Browse files Browse the repository at this point in the history
And other refinements to bring actions up to date.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed Jun 1, 2023
1 parent 5bb6109 commit 61f965a
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 84 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
format:
name: Formatting (with black)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Cache python environment
id: cache-env
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-formatting-black-22.3.0
- name: Install black
if: steps.cache-env.outputs.cache-hit != 'true'
run: |
pip install black==23.3.0
- name: Black Format Check
run: |
black --check pydid
test:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install dependencies
run: poetry install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run pytest
run: poetry run pytest
84 changes: 0 additions & 84 deletions .github/workflows/code-quality-check.yml

This file was deleted.

0 comments on commit 61f965a

Please sign in to comment.