Skip to content

Commit

Permalink
Fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Jul 11, 2023
1 parent 96d5e4e commit 530ec90
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,32 @@ jobs:
fail_ci_if_error: true
verbose: true

benchmarks:
name: 📈 Benchmarks
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3
- run: pipx install poetry
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: "3.11"
architecture: x64
cache: "poetry"

- run: poetry env use 3.11
- run: poetry install
if: steps.setup-python.outputs.cache-hit != 'true'

- name: Run benchmarks
uses: CodSpeedHQ/action@v1
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/benchmarks --codspeed

lint:
name: ✨ Lint
runs-on: ubuntu-latest
Expand Down Expand Up @@ -135,8 +161,8 @@ jobs:
~/.nox
.nox
key:
${{ runner.os }}-nox-windows-${{
hashFiles('**/poetry.lock') }}-${{ hashFiles('**/noxfile.py') }}
${{ runner.os }}-nox-windows-${{ hashFiles('**/poetry.lock') }}-${{
hashFiles('**/noxfile.py') }}
restore-keys: |
${{ runner.os }}-nox-windows
${{ runner.os }}-nox-
Expand Down
7 changes: 0 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ def tests(session: Session) -> None:
)


@session(python=PYTHON_VERSIONS, name="Benchmarks", tags=["tests", "benchmarks"])
def benchmarks(session: Session) -> None:
session.run_always("poetry", "install", external=True)

session.run("pytest", "--codspeed", "tests/benchmarks")


@session(python=["3.11"], name="Django tests", tags=["tests"])
@nox.parametrize("django", ["4.2.0", "4.1.0", "4.0.0", "3.2.0"])
def tests_django(session: Session, django: str) -> None:
Expand Down

0 comments on commit 530ec90

Please sign in to comment.