diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml new file mode 100644 index 0000000..8d8d80c --- /dev/null +++ b/.github/workflows/code-quality.yaml @@ -0,0 +1,30 @@ +name: Code quality +on: [push] +jobs: + unit-tests: + runs-on: ubuntu-latest + + permissions: + id-token: write + contents: read + + steps: + - uses: actions/checkout@v2 + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + + - name: Install dependencies + run: poetry install --no-interaction --no-root + + - name: Linter + run: poetry run flake8 + + - name: Code Formatting + run: poetry run black . + + - name: Type Check + run: poetry run mypy open_rarity diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 87f5a13..3fb94b9 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -1,4 +1,4 @@ -name: Formatting and unit tests +name: Unit tests on: [push] jobs: unit-tests: @@ -16,17 +16,5 @@ jobs: with: python-versions: "3.10,3.11" - - name: Linter - uses: py-actions/flake8@v2 - - - name: Code Formatting - uses: psf/black@stable - - - name: Type Check - run: | - pip install poetry - poetry install - poetry run mypy open_rarity - - name: Unit tests run: nox