File tree Expand file tree Collapse file tree 3 files changed +64
-29
lines changed
Expand file tree Collapse file tree 3 files changed +64
-29
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+ name : Python Verification
5+
6+ on :
7+ push :
8+ branches : [ "master" ]
9+ pull_request :
10+ branches : [ "master" ]
11+
12+ jobs :
13+ build :
14+
15+ runs-on : ubuntu-latest
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ include :
20+ - platform : " alpine"
21+ python : " 3.7"
22+ - platform : " alpine"
23+ python : " 3.8.0"
24+ - platform : " alpine"
25+ python : " 3.8"
26+ - platform : " alpine"
27+ python : " 3.9"
28+ - platform : " alpine"
29+ python : " 3.10"
30+ - platform : " alpine"
31+ python : " 3.11"
32+ - platform : " alpine"
33+ python : " 3.12"
34+ - platform : " alpine"
35+ python : " 3.13"
36+ - platform : " alpine"
37+ python : " 3.14"
38+
39+ steps :
40+ - name : Prepare variables
41+ run : |
42+ RUN_CFG__LOGS_DIR="logs-${{ matrix.platform }}-py${{ matrix.python }}"
43+ echo "RUN_CFG__LOGS_DIR=$RUN_CFG__LOGS_DIR" >> $GITHUB_ENV
44+ RUN_CFG__DOCKER_IMAGE_NAME="tests-${{ matrix.platform }}-py${{ matrix.python }}"
45+ echo "RUN_CFG__DOCKER_IMAGE_NAME=$RUN_CFG__DOCKER_IMAGE_NAME" >> $GITHUB_ENV
46+ echo "---------- [$GITHUB_ENV]"
47+ cat $GITHUB_ENV
48+ - name : Checkout
49+ uses : actions/checkout@v4
50+ - name : Prepare logs folder on the host
51+ run : mkdir -p "${{ env.RUN_CFG__LOGS_DIR }}"
52+ - name : Adjust logs folder permission
53+ run : chmod -R 777 "${{ env.RUN_CFG__LOGS_DIR }}"
54+ - name : Build local image ${{ matrix.alpine }}
55+ run : docker build --build-arg PYTHON_VERSION="${{ matrix.python }}" -t "${{ env.RUN_CFG__DOCKER_IMAGE_NAME }}" -f Dockerfile--${{ matrix.platform }}.tmpl .
56+ - name : Run
57+ run : docker run -t -v ${{ github.workspace }}/${{ env.RUN_CFG__LOGS_DIR }}:/home/test/testgres/logs "${{ env.RUN_CFG__DOCKER_IMAGE_NAME }}"
58+ - name : Upload Logs
59+ uses : actions/upload-artifact@v4
60+ if : always() # IT IS IMPORTANT!
61+ with :
62+ name : container-logs--${{ matrix.platform }}-py${{ matrix.python }}
63+ path : " ${{ env.RUN_CFG__LOGS_DIR }}/"
64+ retention-days : 90
Load Diff This file was deleted.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments