-
Notifications
You must be signed in to change notification settings - Fork 3
131 lines (109 loc) · 3.94 KB
/
test-envs-docker.yml
File metadata and controls
131 lines (109 loc) · 3.94 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
name: Test Environments Docker Sites
on:
workflow_dispatch:
inputs:
site:
description: "Site to test"
required: false
default: all
type: choice
options:
- all
- gitlab
- map
- reddit
- shopping
- shopping_admin
- wikipedia
permissions:
contents: read
actions: write
concurrency:
group: test-envs-docker-${{ github.ref }}-${{ github.event.inputs.site || 'all' }}
cancel-in-progress: true
concurrency:
group: test-envs-docker-${{ github.ref }}-${{ github.event.inputs.site || 'all' }}
cancel-in-progress: true
jobs:
test-all:
if: github.event.inputs.site == '' || github.event.inputs.site == 'all'
name: Test ${{ matrix.site }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
site:
- gitlab
- map
- reddit
- shopping
- shopping_admin
- wikipedia
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup
with:
install-playwright: 'true'
- name: Download CI ZIM
if: matrix.site == 'wikipedia'
run: uv run invoke dev.ci.setup-wikipedia
- name: Restore map test data cache
if: matrix.site == 'map'
id: map-data-cache
uses: actions/cache@v4
with:
path: data/map
key: map-monaco-data-v1
- name: Generate map test data
if: matrix.site == 'map' && steps.map-data-cache.outputs.cache-hit != 'true'
run: uv run invoke dev.ci.generate-map-data
- name: Build Docker image
run: uv run invoke envs.docker.build --site=${{ matrix.site }} --tag=test
- name: Run integration tests (default sites)
if: matrix.site != 'wikipedia' && matrix.site != 'map'
run: uv run invoke envs.docker.test --site=${{ matrix.site }} --tag=test
- name: Run integration tests (wikipedia)
if: matrix.site == 'wikipedia'
run: uv run invoke envs.docker.test --site=wikipedia --tag=test --data-dir=data/wikipedia
- name: Run integration tests (map)
if: matrix.site == 'map'
run: uv run invoke envs.docker.test --site=map --tag=test --data-dir=data/map
test-one:
if: github.event.inputs.site != '' && github.event.inputs.site != 'all'
name: Test ${{ github.event.inputs.site }}
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup
with:
install-playwright: 'true'
- name: Download CI ZIM
if: github.event.inputs.site == 'wikipedia'
run: uv run invoke dev.ci.setup-wikipedia
- name: Restore map test data cache
if: github.event.inputs.site == 'map'
id: map-data-cache
uses: actions/cache@v4
with:
path: data/map
key: map-monaco-data-v1
- name: Generate map test data
if: github.event.inputs.site == 'map' && steps.map-data-cache.outputs.cache-hit != 'true'
run: uv run invoke dev.ci.generate-map-data
- name: Build Docker image
run: uv run invoke envs.docker.build --site=${{ github.event.inputs.site }} --tag=test
- name: Run integration tests (default sites)
if: github.event.inputs.site != 'wikipedia' && github.event.inputs.site != 'map'
run: uv run invoke envs.docker.test --site=${{ github.event.inputs.site }} --tag=test
- name: Run integration tests (wikipedia)
if: github.event.inputs.site == 'wikipedia'
run: uv run invoke envs.docker.test --site=wikipedia --tag=test --data-dir=data/wikipedia
- name: Run integration tests (map)
if: github.event.inputs.site == 'map'
run: uv run invoke envs.docker.test --site=map --tag=test --data-dir=data/map