-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (49 loc) · 1.41 KB
/
snowflake-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Docker tests
run-name: ${{ github.actor }} is running the test schedules.
on:
push:
branches:
- main
jobs:
run-scripts:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
pgver: [14, 15, 16, 17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout snowflake
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Docker
uses: docker/setup-buildx-action@v2
- name: Build Docker Image
run: |
docker build --build-arg PGVER=${{ matrix.pgver }} -t snowflake .
- name: Run Docker Container
run: |
docker run -d --name snowflake -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 snowflake
sleep 5
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt -y update
sudo apt install -y postgresql-client \
libpq-dev \
python3-dev \
python3-psycopg2 \
python3-dotenv
- name: Run Test Harness (runner.py)
run: |
python test/runner.py -c test/t/lib/${{ matrix.pgver }}config.env -s test/schedule_files/script_file -k
cat latest.log
- name: Upload Log File as Artifact
uses: actions/upload-artifact@v4
with:
name: latest-log-${{ matrix.pgver }}
path: latest.log