-
Notifications
You must be signed in to change notification settings - Fork 90
83 lines (79 loc) · 2.45 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/make-in-docker
with:
target: lint
python_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/make-in-docker
with:
target: python_test
go_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/make-in-docker
with:
target: go_test
web_components_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/make-in-docker
with:
target: web_components_test
go_chrome_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/make-in-docker
with:
target: go_chrome_test
go_firefox_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/make-in-docker
with:
target: go_firefox_test
go_cloud_test:
# This job uses real Cloud resources.
# This means this CI job will have access to the service account.
# In that case, similar to deploy.yml, trust only pull requests that are
# made within web-platform-tests and exclude forks.
if: |
(github.repository == 'web-platform-tests/wpt.fyi') &&
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'web-platform-tests/wpt.fyi' && github.actor != 'dependabot[bot]') ||
(github.event_name != 'pull_request'))
needs: [go_test, go_chrome_test, go_firefox_test]
runs-on: ubuntu-latest
env:
DOCKER_IMAGE: webplatformtests/wpt.fyi:latest
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: secrets
run: echo "$GCLOUD_KEY_FILE_JSON" > client-secret.json
env:
GCLOUD_KEY_FILE_JSON: ${{ secrets.GCLOUD_KEY_FILE_JSON }}
- name: Set DOCKER_INSTANCE
run: echo "DOCKER_INSTANCE=wptd-dev-$(echo $RANDOM)" >> $GITHUB_ENV
- name: pre-installation
run: |
docker pull "${DOCKER_IMAGE}"
bash ./util/docker-dev/run.sh -d -q
- name: run tests with "cloud" build tag
run: docker exec -t "${DOCKER_INSTANCE}" make go_cloud_test;