-
Notifications
You must be signed in to change notification settings - Fork 36
135 lines (129 loc) · 4.42 KB
/
package-verification.yml
File metadata and controls
135 lines (129 loc) · 4.42 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Run Package Verifications
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 flake8-pyproject
- name: Lint with flake8
run: |
flake8 .
test:
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
include:
- platform: "std2-all"
python: "3.7"
postgres: "17"
- platform: "std2-all"
python: "3.8.0"
postgres: "17"
- platform: "std2-all"
python: "3.8"
postgres: "17"
- platform: "std2-all"
python: "3.9"
postgres: "17"
- platform: "std2-all"
python: "3.10"
postgres: "17"
- platform: "std2-all"
python: "3.11"
postgres: "17"
- platform: "std2-all"
python: "3.12"
postgres: "17"
- platform: "std2-all"
python: "3.13"
postgres: "17"
- platform: "std2-all"
python: "3.14"
postgres: "17"
- platform: "std"
python: "3"
postgres: "10"
- platform: "std"
python: "3"
postgres: "11"
- platform: "std"
python: "3"
postgres: "12"
- platform: "std"
python: "3"
postgres: "13"
- platform: "std"
python: "3"
postgres: "14"
- platform: "std"
python: "3"
postgres: "15"
- platform: "std"
python: "3"
postgres: "16"
- platform: "std-all"
python: "3"
postgres: "17"
- platform: "std-all"
python: "3"
postgres: "18"
- platform: "ubuntu_24_04"
python: "3"
postgres: "17"
- platform: "altlinux_10"
python: "3"
postgres: "17"
- platform: "altlinux_11"
python: "3"
postgres: "17"
- platform: "astralinux_1_7"
python: "3"
postgres: "17"
steps:
- name: Prepare variables
run: |
RUN_CFG__NOW="$(date +'%Y%m%d_%H%M%S')"
echo "RUN_CFG__NOW=$RUN_CFG__NOW" >> $GITHUB_ENV
RUN_CFG__LOGS_DIR="logs-${{ matrix.platform }}-py${{ matrix.python }}-pg${{ matrix.postgres }}"
echo "RUN_CFG__LOGS_DIR=$RUN_CFG__LOGS_DIR" >> $GITHUB_ENV
RUN_CFG__DOCKER_IMAGE_NAME="tests-${{ matrix.platform }}-py${{ matrix.python }}-pg${{ matrix.postgres }}"
echo "RUN_CFG__DOCKER_IMAGE_NAME=$RUN_CFG__DOCKER_IMAGE_NAME" >> $GITHUB_ENV
echo "---------- [$GITHUB_ENV]"
cat $GITHUB_ENV
- name: Prepare logs folder on the host
run: mkdir -p "${{ env.RUN_CFG__LOGS_DIR }}"
- name: Adjust logs folder permission
run: chmod -R 777 "${{ env.RUN_CFG__LOGS_DIR }}"
- name: Checkout
uses: actions/checkout@v4
- name: Build local image ${{ matrix.alpine }}
run: docker build --build-arg PG_VERSION="${{ matrix.postgres }}" --build-arg PYTHON_VERSION="${{ matrix.python }}" -t "${{ env.RUN_CFG__DOCKER_IMAGE_NAME }}" -f Dockerfile--${{ matrix.platform }}.tmpl .
- name: Run
run: docker run $(bash <(curl -s https://codecov.io/env)) -t -v ${{ github.workspace }}/${{ env.RUN_CFG__LOGS_DIR }}:/home/test/testgres/logs "${{ env.RUN_CFG__DOCKER_IMAGE_NAME }}"
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always() # IT IS IMPORTANT!
with:
name: testgres--test_logs--${{ env.RUN_CFG__NOW }}-${{ matrix.platform }}-py${{ matrix.python }}-pg${{ matrix.postgres }}-id${{ github.run_id }}
path: "${{ env.RUN_CFG__LOGS_DIR }}/"