Skip to content

Commit b177c26

Browse files
authored
fix: integration test failing to install python dependencies (#1039)
1 parent 57708e3 commit b177c26

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

.github/workflows/integration-tests-pr.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ jobs:
4949
id: getpath
5050
run: echo "FILE_PATH=$(realpath sources.csv)" >> $GITHUB_ENV
5151

52-
- name: Install dependencies
53-
run: |
54-
python -m pip install --upgrade pip
55-
pip install -r integration-tests/requirements.txt
56-
pip install -r api/requirements.txt
57-
5852
- name: Set up JDK ${{ env.java_version }}
5953
uses: actions/setup-java@v4
6054
with:
@@ -110,11 +104,6 @@ jobs:
110104
./scripts/tunnel-create.sh -project_id ${{ vars.QA_MOBILITY_FEEDS_PROJECT_ID }} -zone ${{ vars.MOBILITY_FEEDS_REGION }}-a -instance ${{ env.GCP_FEED_BASTION_NAME }}-${{ vars.QA_MOBILITY_FEEDS_ENVIRONMENT }} -target_account ${{ env.GCP_FEED_SSH_USER }} -db_instance ${{ secrets.DB_INSTANCE_NAME }} -port 5454
111105
sleep 10 # Wait for the tunnel to establish
112106
113-
- name: Test Database Connection Through Tunnel
114-
run: |
115-
sudo apt-get update && sudo apt-get install -y postgresql-client
116-
PGPASSWORD=${{ secrets.QA_POSTGRE_USER_PASSWORD }} psql -h localhost -p 5454 -U ${{ secrets.QA_POSTGRE_USER_NAME }} -d ${{ vars.QA_POSTGRE_SQL_DB_NAME }} -c "SELECT version();"
117-
118107
- name: Update .env.local
119108
run: |
120109
echo "FEEDS_DATABASE_URL=postgresql://${{ secrets.QA_POSTGRE_USER_NAME }}:${{ secrets.QA_POSTGRE_USER_PASSWORD }}@localhost:5454/${{ vars.QA_POSTGRE_SQL_DB_NAME }}" >> $GITHUB_ENV

.github/workflows/integration-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ jobs:
4343
id: getpath
4444
run: echo "FILE_PATH=$(realpath sources.csv)" >> $GITHUB_ENV
4545

46-
- name: Install dependencies
47-
working-directory: integration-tests
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install -r requirements.txt
51-
5246
- name: Health Check
5347
# When triggered by a repo dispatch the API code is not deployed so there could be discrepancies
5448
# between the code running the tests and the code running the API. In that case don't do the

scripts/local_docker/Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This docker is used to test locally scripts that are executed in the CI.
2+
# How to run the container and have shell access:
3+
# docker build -t ubuntu-local-python311 .
4+
# docker run -it ubuntu-local-python311
5+
6+
FROM ubuntu:latest
7+
8+
# Install prerequisites and add deadsnakes PPA for newer Python versions
9+
RUN apt-get update && apt-get install -y software-properties-common \
10+
&& add-apt-repository ppa:deadsnakes/ppa \
11+
&& apt-get update
12+
13+
# Install Python 3.11 and Git
14+
RUN apt-get install -y python3.11 python3.11-dev python3-pip git
15+
16+
# Optional: update alternatives to make python3.11 the default
17+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
18+
19+
# Set working directory
20+
WORKDIR /app
21+
22+
CMD ["bash"]

0 commit comments

Comments
 (0)