Skip to content

Commit

Permalink
Merge pull request #28 from DataChefHQ/27-run-python-tests-in-test-wo…
Browse files Browse the repository at this point in the history
…rkflow

feat(python): run pytest command at `devenv test`.
  • Loading branch information
shahinism authored Jul 22, 2024
2 parents ea96b97 + 6d36ebe commit 1c31faf
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 93 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
1 change: 1 addition & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
enterShell = ''
pdm install --no-self
'';

# Make diffs fantastic
difftastic.enable = true;

Expand Down
49 changes: 1 addition & 48 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

pytest -vv
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: "Test"
on:
pull_request:
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv

- name: Build the devenv shell and run any pre-commit hooks
run: devenv test
- name: Build the devenv shell and run any pre-commit hooks
run: devenv test

0 comments on commit 1c31faf

Please sign in to comment.