diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3a6e9496..147260a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,8 @@ on: [push, pull_request] jobs: tests: uses: ./.github/workflows/tests.yaml + self_test: + uses: ./.github/workflows/self_test.yaml lint: uses: ./.github/workflows/lint.yaml format: diff --git a/.github/workflows/self_test.yaml b/.github/workflows/self_test.yaml new file mode 100644 index 00000000..fa46bc8b --- /dev/null +++ b/.github/workflows/self_test.yaml @@ -0,0 +1,32 @@ +name: Self test + +on: [workflow_call] + +jobs: + tests: + strategy: + fail-fast: false + matrix: + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + os: [ubuntu-22.04] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Set up Poetry + uses: Gr1N/setup-poetry@v8 + with: + poetry-version: "1.5.1" # support for Python 3.7 was dropped in 1.6.0 + - uses: actions/cache@v2 + with: + path: | + ~/.cache/pypoetry/virtualenvs + key: ${{ runner.os }}-poetry-self-test-${{ hashFiles('poetry.lock') }} + - name: Install project + run: poetry install --no-interaction --sync --with=nox,test,lint,format,dev + - name: Run fawltydeps on Python ${{ matrix.python-version }} + run: poetry run nox --no-venv --no-install --non-interactive -s self_test -- -vv diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ae21be72..d33b92ba 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -33,5 +33,3 @@ jobs: run: poetry run nox --no-venv --no-install --non-interactive -s tests -- -vv - name: Run integration tests on Python ${{ matrix.python-version }} run: poetry run nox --no-venv --no-install --non-interactive -s integration_tests -- -vv - - name: Run fawltydeps on Python ${{ matrix.python-version }} - run: poetry run nox --no-venv --no-install --non-interactive -s self_test -- -vv