forked from localstack/localstack
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (67 loc) · 2.5 KB
/
tests-podman.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Podman Docker Client Tests
on:
workflow_dispatch:
env:
# Set non-job-specific environment variables for pytest-tinybird
TINYBIRD_URL: https://api.tinybird.co
TINYBIRD_DATASOURCE: community_tests_podman
TINYBIRD_TOKEN: ${{ secrets.TINYBIRD_CI_TOKEN }}
CI_COMMIT_BRANCH: ${{ github.head_ref || github.ref_name }}
CI_COMMIT_SHA: ${{ github.sha }}
CI_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}
# report to tinybird if executed on master
TINYBIRD_PYTEST_ARGS: "${{ github.ref == 'refs/heads/master' && '--report-to-tinybird ' || '' }}"
jobs:
podman-tests:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
# Set job-specific environment variables for pytest-tinybird
CI_JOB_NAME: ${{ github.job }}
CI_JOB_ID: ${{ github.job }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install podman and test dependencies
run: |
make install-test &
# install podman
sudo apt update
sudo apt install -y podman
podman ps
podman system info
# disable Docker, to ensure the tests are running against Podman only
docker ps
sudo mv /var/run/docker.sock /var/run/docker.sock.bk
docker ps && exit 1
dockerCmd=$(which docker)
sudo mv $dockerCmd $dockerCmd".bk"
# wait for async installation process to finish
wait
- name: Run Podman Docker client tests
env:
DOCKER_CMD: "podman"
PYTEST_ARGS: "${{ env.TINYBIRD_PYTEST_ARGS }}"
TEST_PATH: "tests/integration/docker_utils"
DEBUG: "1"
run: |
# determine path of podman socket
podmanSocket=$(podman system info --format json | jq -r '.host.remoteSocket.path')
echo "Running tests against local podman socket $podmanSocket"
DOCKER_HOST=$podmanSocket make test
push-to-tinybird:
if: always() && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: podman-tests
steps:
- name: Push to Tinybird
uses: localstack/tinybird-workflow-push@v3
with:
workflow_id: "tests_podman"
tinybird_token: ${{ secrets.TINYBIRD_CI_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
tinybird_datasource: "ci_workflows"