mirror of https://github.com/astral-sh/uv
Use `.env` file instead of `.envrc` (#1132)
#1131 shows that `direnv` installation is _most_ of the CI overhead introduced by #1105. Instead of using `direnv`, let's just use a simple `.env` file that can be loaded with `source` or [`direnv`'s `dotenv` directive](https://direnv.net/man/direnv-stdlib.1.html#codedotenv-ltdotenvpathgtcode).
This commit is contained in:
parent
5cc4e5d31e
commit
0cdde8949f
|
|
@ -56,9 +56,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: "Install required Python versions"
|
||||
run: |
|
||||
sudo apt install direnv
|
||||
scripts/bootstrap/install.sh
|
||||
direnv allow .envrc
|
||||
- name: "Install Rust toolchain"
|
||||
run: rustup show
|
||||
- uses: rui314/setup-mold@v1
|
||||
|
|
@ -71,7 +69,8 @@ jobs:
|
|||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: "Tests"
|
||||
run: |
|
||||
direnv exec . cargo nextest run --all --all-features --status-level skip --failure-output immediate-final --no-fail-fast -j 12
|
||||
source .env
|
||||
cargo nextest run --all --all-features --status-level skip --failure-output immediate-final --no-fail-fast -j 12
|
||||
|
||||
# TODO(konstin): Merge with the cargo-test job once the tests pass
|
||||
windows:
|
||||
|
|
|
|||
|
|
@ -43,21 +43,20 @@ Install required Python versions with the bootstrapping script:
|
|||
scripts/bootstrap/install.sh
|
||||
```
|
||||
|
||||
Then add the Python binaries to your path:
|
||||
The installed Python binaries will be available in `<repo>/bin` and must be added to your path to be used. We
|
||||
provide a `.env` file with the proper environment variables for development. You may activate it with:
|
||||
|
||||
```
|
||||
export PATH=$PWD/bin:$PATH
|
||||
source .env
|
||||
```
|
||||
|
||||
We also strongly recommend setting the `PUFFIN_PYTHON_PATH` variable during development; this will prevent your
|
||||
system Python versions from being found during tests:
|
||||
Or, if you use `direnv` to manage your environment:
|
||||
|
||||
```
|
||||
export PUFFIN_PYTHON_PATH=$PWD/bin
|
||||
echo "dotenv" >> .envrc
|
||||
direnv allow
|
||||
```
|
||||
|
||||
If you use [direnv](https://direnv.net/), these variables will be exported automatically after you run `direnv allow`.
|
||||
|
||||
## Testing
|
||||
|
||||
To run the tests we recommend [nextest](https://nexte.st/). Make sure to run the tests with `--all-features`, otherwise you'll miss most of our integration tests.
|
||||
|
|
|
|||
Loading…
Reference in New Issue