-
-
Notifications
You must be signed in to change notification settings - Fork 2k
102 lines (85 loc) · 3.15 KB
/
pr-tests-stack-arm64.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
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
name: PR Tests - Stack - Arm64
on:
workflow_call:
workflow_dispatch:
inputs:
none:
description: "Run Version Tests Manually"
required: false
concurrency:
group: stackarm64-${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow, github.event.pull_request.number) || github.workflow_ref }}
cancel-in-progress: true
jobs:
pr-tests-stack-arm64:
strategy:
max-parallel: 3
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
runs-on: ${{matrix.os}}
steps:
# - name: set permissions on work folder for self-runners
# run: |
# sudo chown -R $USER:$USER ~/actions-runner/_work/
- uses: actions/checkout@v4
# free 10GB of space
- name: Remove unnecessary files
if: matrix.os == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
docker image prune --all --force
docker builder prune --all --force
docker system prune --all --force
- name: Check for file changes
uses: dorny/paths-filter@v3
id: changes
with:
base: ${{ github.ref }}
token: ${{ github.token }}
filters: .github/file-filters.yml
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: |
pip install --upgrade pip uv==0.1.35
uv --version
# - name: Get pip cache dir
# id: pip-cache
# shell: bash
# run: |
# echo "dir=$(uv cache dir)" >> $GITHUB_OUTPUT
# - name: pip cache
# uses: actions/cache@v3
# with:
# path: ${{ steps.pip-cache.outputs.dir }}
# key: ${{ runner.os }}-uv-py${{ matrix.python-version }}
# restore-keys: |
# ${{ runner.os }}-uv-py${{ matrix.python-version }}
- name: Install tox
run: |
pip install --upgrade tox tox-uv==1.5.1
- name: Install Docker Compose
if: runner.os == 'Linux'
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
- name: Setup linux/arm64 Docker
run: |
docker rm $(docker ps -aq) --force || true
docker volume prune -f || true
docker buildx create --platform linux/arm64 --name arm64builder || true
docker buildx use arm64builder || true
docker run --privileged --rm tonistiigi/binfmt --install arm64
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Run integration tests
uses: nick-fields/retry@v3
with:
timeout_seconds: 36000
max_attempts: 3
command: EMULATION="true" HAGRID_FLAGS="--tag=local --test --platform linux/arm64" tox -e stack.test.integration