Repository navigation
108 lines (96 loc) · 3.35 KB
/
Copy pathci.yaml
File metadata and controls
108 lines (96 loc) · 3.35 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
name: Run CI checks
on:
pull_request:
# Also run on pushes to main so the GHA cache is seeded under the default branch.
# PR runs can only read caches from their own branch or the base/default branch,
# so without this the Docker layer cache would be cold on every new PR.
push:
branches: [main]
permissions:
contents: read
jobs:
run_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Check workflow files
run: |
curl --fail -L "https://github.com/rhysd/actionlint/releases/download/v${{ env.ACTIONLINT_VERSION }}/actionlint_${{ env.ACTIONLINT_VERSION }}_linux_amd64.tar.gz" -o actionlint.tar.gz
echo "${{ env.ACTIONLINT_SHA256 }} actionlint.tar.gz" | sha256sum --check -
tar xzf actionlint.tar.gz actionlint
./actionlint -color
env:
ACTIONLINT_VERSION: 1.7.12
ACTIONLINT_SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 # pragma: allowlist secret
- name: Install typos spellcheck
run: cargo install typos-cli
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: "3.14.7"
- name: Install dependencies
run: make install
- name: Run linting and formatting checks
run: make lint
docs_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: "3.14.7"
- name: Check documentation build
run: make docs
run_test:
needs: run_lint
uses: ./.github/workflows/test.yaml
cronjobs-test:
needs: run_test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build cronjobs container
uses: docker/build-push-action@v7
with:
cache-from: type=gha,scope=cronjobs-ci
cache-to: type=gha,mode=max,scope=cronjobs-ci
load: true
file: cronjobs/Dockerfile
context: cronjobs/
tags: remote-settings/cronjobs:latest # Like with docker compose build cronjobs
- name: Run cronjobs container
# `help` command will import all modules, and make sure all dependencies are correctly installed.
run: docker run --rm remote-settings/cronjobs help
browser-test:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
CONFIG_MOUNT: ""
SRC_MOUNT: ""
steps:
- uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build web container
uses: docker/build-push-action@v7
with:
cache-from: type=gha,scope=web-ci
cache-to: type=gha,mode=max,scope=web-ci
file: RemoteSettings.Dockerfile
context: .
tags: remotesettings/local # Like with docker compose build web
- name: Build test container
uses: docker/build-push-action@v7
with:
cache-from: type=gha,scope=tests-ci
cache-to: type=gha,mode=max,scope=tests-ci
context: browser-tests/
- name: Run browser tests
run: make browser-test