@@ -3,97 +3,24 @@ name: Run parallel tests
33on : [push, pull_request]
44
55jobs :
6- docker-tests :
7- name : Docker Tests / Python ${{ matrix.python-version }}
6+ test :
7+ name : Tests / Python ${{ matrix.python-version }}
88 runs-on : ubuntu-latest
99 strategy :
1010 matrix :
1111 python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1212
1313 steps :
1414 - uses : actions/checkout@v3
15-
1615 - name : Set up Python
1716 uses : actions/setup-python@v3
1817 with :
1918 python-version : ${{ matrix.python-version }}
20-
19+ - uses : gacts/install-podman@v1
2120 - name : Install dependencies
2221 run : |
2322 python -m pip install --upgrade pip
2423 pip install hatch
25-
26- - name : Install Docker CE
27- run : |
28- sudo apt-get update
29- sudo apt-get install -y \
30- ca-certificates \
31- curl \
32- gnupg \
33- lsb-release
34- sudo mkdir -p /etc/apt/keyrings
35- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
36- echo \
37- "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
38- $(lsb_release -cs) stable" | \
39- sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
40- sudo apt-get update
41- sudo apt-get install -y docker-ce docker-ce-cli containerd.io
42- sudo systemctl start docker
43- docker --version
44-
45- - name : Run Docker scenario tests
46- run : |
47- hatch run ci -- dbtesttools.tests.test_pgfixture_docker dbtesttools.tests.test_isolation
48-
49- podman-tests :
50- name : Podman Tests / Python ${{ matrix.python-version }}
51- runs-on : ubuntu-latest
52- strategy :
53- matrix :
54- python-version : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
55-
56- steps :
57- - uses : actions/checkout@v3
58-
59- - name : Set up Python
60- uses : actions/setup-python@v3
61- with :
62- python-version : ${{ matrix.python-version }}
63-
64- - name : Install dependencies
65- run : |
66- python -m pip install --upgrade pip
67- pip install hatch
68-
69- - name : Install Podman
70- run : |
71- sudo apt-get update
72- sudo apt-get install -y podman
73- podman --version
74-
75- - name : Start Podman API (rootless)
76- run : |
77- export XDG_RUNTIME_DIR="/run/user/$(id -u)"
78- sudo mkdir -p "$XDG_RUNTIME_DIR"
79- sudo chown $(id -u):$(id -g) "$XDG_RUNTIME_DIR"
80- mkdir -p "$XDG_RUNTIME_DIR"
81- nohup podman system service --time=0 unix://$XDG_RUNTIME_DIR/podman/podman.sock > podman-api.log 2>&1 &
82- echo "Waiting for podman.sock..."
83- for i in {1..10}; do
84- if podman info > /dev/null 2>&1; then
85- echo "Podman is up"
86- break
87- fi
88- sleep 2
89- done
90- cat podman-api.log
91- if ! podman info > /dev/null 2>&1; then
92- echo "::error ::Podman API service failed to start"
93- cat podman-api.log
94- exit 1
95- fi
96-
97- - name : Run Podman scenario tests
24+ - name : Run tests
9825 run : |
99- hatch run ci -- dbtesttools.tests.test_pgfixture_podman dbtesttools.tests.test_isolation
26+ hatch run ci
0 commit comments