Update snowflake-docker.yml #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker tests | ||
run-name: ${{ github.actor }} is running the test schedules. | ||
on: | ||
push: | ||
branches: | ||
- GH_actions_test | ||
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: Build Docker image | ||
run: | | ||
DOCKERFILE_NAME="Dockerfile.pg${{ matrix.pgver }}" | ||
docker build -t my-app:${{ matrix.pgver }} -f $DOCKERFILE_NAME . | ||
- name: Run Docker Container | ||
run: | | ||
docker run -d --name DOCKERFILE_NAME -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 DOCKERFILE_NAME | ||
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 |