diff --git a/.env b/.env new file mode 100644 index 000000000..e7317790a --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +PATH=$PWD/bin:$PATH +PUFFIN_PYTHON_PATH=$PWD/bin diff --git a/.envrc b/.envrc deleted file mode 100644 index 14c366045..000000000 --- a/.envrc +++ /dev/null @@ -1,3 +0,0 @@ -PATH=$PWD/bin:$PATH -export PUFFIN_PYTHON_PATH=$PWD/bin - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11550223a..c87ab5d93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ecf58e5bf..10aac8af3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 `/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.