Skip to content

Commit

Permalink
ci: Only install OS dependencies for act
Browse files Browse the repository at this point in the history
Github CI already has these packages installed, so we don't need to install
them. However, the smaller images provided by act don't have these
installed.

Signed-off-by: Sean Anderson <[email protected]>
  • Loading branch information
Forty-Bot committed Nov 17, 2023
1 parent c1b8422 commit 62e68bc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install OS dependencies
if: ${{ env.ACT }}
run: |
sudo mkdir -p /etc/postgresql-common/createcluster.d/
echo "create_main_cluster = false" | \
sudo tee /etc/postgresql-common/createcluster.d/override.conf
sudo apt-get update
sudo apt-get install -y python3-dev postgresql
- name: Get pip cache dir
id: pip-cache
run: |
Expand All @@ -19,13 +27,8 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'requirements_test.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
- name: Install python dependencies
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
sudo mkdir -p /etc/postgresql-common/createcluster.d/
echo "create_main_cluster = false" | \
sudo tee /etc/postgresql-common/createcluster.d/override.conf
sudo apt-get update
sudo apt-get install -y python3-dev postgresql
pip install -r requirements.txt -r requirements_test.txt
- run: pytest

0 comments on commit 62e68bc

Please sign in to comment.