Skip to content

Commit

Permalink
Write env variable for min version (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Nov 20, 2022
1 parent e7e27c6 commit 0875056
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/actions/install-minimums/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ runs:
pip check
pip list
echo "::endgroup::"
else
echo "PIP_CONSTRAINT=${{inputs.constraints_file_path}}" >> $GITHUB_ENV
fi
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ jobs:
only_create_file: 1
constraints_file_path: './constraints-test.txt'
- name: Ensure constraints file
run: cat ./constraints-test.txt
run: |
cat ./constraints-test.txt
echo $PIP_CONSTRAINT | grep "constraints-test.txt"
update_snapshots-manual-server:
runs-on: ubuntu-latest
Expand Down
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,34 @@ jobs:
only_create_file: 1
- name: Run the unit tests
run: |
export PIP_CONSTRAINT="./contraints_file.txt"
hatch run test:test
```

Note that you can run a test against prereleases like the following:

```yaml
name: Prerelease Dependencies
on:
push:
branches: ["main"]
pull_request:
jobs:
test_prereleases:
name: Test Prereleases
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
with:
python_version: "3.11"
- name: Run the tests
run: |
PIP_PRE=1 hatch run test:nowarn || hatch run test:nowarn --lf
```

## Test SDist

Use this pair of actions to build an sdist for your package, and then test it
Expand Down

0 comments on commit 0875056

Please sign in to comment.