-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
2,056 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,3 +61,18 @@ jobs: | |
pytest-md | ||
pytest-emoji | ||
- uses: ./. | ||
|
||
test-pixi: | ||
name: Run tests (setup-pixi) | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up micromamba environment | ||
uses: prefix-dev/[email protected] | ||
- uses: ./. | ||
with: | ||
custom-pytest: pixi run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
**/.pytest_cache/ | ||
venv/ | ||
.idea/ | ||
.pixi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,12 +47,14 @@ If you want to change the time zone of the job summary, you may want to use the | |
|
||
## Activating `conda` environments | ||
|
||
This action uses `bash -l {0}` as the shell to run `pytest` in, | ||
i.e., the login shell that also sources your `.bash_profile`. | ||
When using `bash` in GitHub Actions, it doesn't source your `.bash_profile` by default. | ||
If you want to use a `conda` environment, you need to make sure to add it into your `.bash_profile` s.t. | ||
the `conda` environment automatically gets activated. | ||
[mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) | ||
### setup-micromamba | ||
|
||
This action uses `bash -l {0}` as the shell to run `pytest` in, | ||
i.e., the login shell that also sources your `.bash_profile`. | ||
When using `bash` in GitHub Actions, it doesn't source your `.bash_profile` by default. | ||
If you want to use a `conda` environment, you need to make sure to add it into your `.bash_profile` s.t. | ||
the `conda` environment automatically gets activated. | ||
[mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) | ||
does this automatically for you. | ||
|
||
```yml | ||
|
@@ -68,6 +70,18 @@ does this automatically for you. | |
- uses: pavelzw/pytest-action@v2 | ||
``` | ||
|
||
### setup-pixi | ||
|
||
You can also use [pixi](https://github.com/prefix-dev/pixi) to work with conda environments. | ||
For this, use the [setup-pixi](https://github.com/prefix-dev/setup-pixi) action with `custom-pytest: pixi run pytest`: | ||
|
||
```yml | ||
- uses: prefix-dev/[email protected] | ||
- uses: pavelzw/pytest-action@v2 | ||
with: | ||
custom-pytest: pixi run pytest | ||
``` | ||
|
||
## Example Usage | ||
|
||
```yml | ||
|
Oops, something went wrong.