Skip to content

Commit b03c50e

Browse files
committed
Fix CI pipeline for self-hosted runner
Replace actions/setup-python with venv to avoid permission errors on self-hosted runner. Move seed.py into app/ so it's included in the Docker build context.
1 parent 142852e commit b03c50e

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/ci-pipeline.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,17 @@ jobs:
2626
- name: Checkout Code
2727
uses: actions/checkout@v3
2828

29-
- name: Set up Python
30-
uses: actions/setup-python@v4
31-
with:
32-
python-version: '3.12'
33-
3429
- name: Install Dependencies
3530
run: |
3631
cd app
37-
python3 -m pip install --upgrade pip
32+
python3 -m venv venv
33+
source venv/bin/activate
34+
pip install --upgrade pip
3835
pip install -r requirements.txt
3936
4037
- name: Run Tests with SQLite
4138
run: |
39+
source app/venv/bin/activate
4240
pytest -v
4341
4442
- name: Build Docker Image

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ignore virtual env files into git
22
/venv/*
3+
app/venv/
4+
5+
# ignore self-hosted GitHub Actions runner
6+
actions-runner/
37

48
# ignore environment variable files
59
.env
File renamed without changes.

0 commit comments

Comments
 (0)