Skip to content

Commit

Permalink
Avoid using environment in CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Oct 30, 2024
1 parent 3f7cb51 commit 41d9038
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,15 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, 3.11]
fail-fast: false
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'cmd' || 'bash' }} -l {0} # Adjust shell based on OS
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create venv and install dependencies
run: |
python -m venv .venv
.venv/Scripts/activate || source .venv/bin/activate
pip install -e .[dev]
- name: Activate venv for later steps
run: |
echo "VIRTUAL_ENV=$(pwd)/.venv" >> $GITHUB_ENV
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH # For Unix-like systems
echo "$(pwd)/.venv/Scripts" >> $GITHUB_PATH # For Windows
- name: Install dependencies
run: pip install -e .[dev]

- name: ruff
run: ruff check .
Expand Down

0 comments on commit 41d9038

Please sign in to comment.