-
-
Notifications
You must be signed in to change notification settings - Fork 59
109 lines (94 loc) · 2.54 KB
/
test.yml
File metadata and controls
109 lines (94 loc) · 2.54 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
name: Run test
on:
push:
branches:
- main
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'
paths-ignore:
- .github/actions/**
- ./*.md
pull_request:
branches:
- main
workflow_call:
env:
HUSKY: 0
jobs:
setup:
runs-on: ubuntu-latest
environment: 'test'
steps:
- uses: actions/checkout@v4
- name: Prepare env file
run: cp sample.env .env
- name: Upload env file
uses: actions/upload-artifact@v5
with:
name: env-file
path: .env
retention-days: 1
include-hidden-files: true
test:
needs: setup
runs-on: ubuntu-latest
environment: 'test'
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Set yarn version
run: yarn set version 4.9.1
- name: Run lint and tests
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
run: |
yarn install
yarn lint
yarn ci:all
yarn check-locales
yarn check-translations
yarn check-flags
yarn typecheck
build:
if: ${{ !startsWith(github.event.head_commit.message , 'test:') }}
needs: test
runs-on: ubuntu-latest
environment: 'test'
strategy:
matrix:
node-version: [22.x]
browser: [chrome, edge, firefox]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Set yarn version
run: yarn set version 4.9.1
- name: Download env file
uses: actions/download-artifact@v6
with:
name: env-file
- name: Build ${{ matrix.browser }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
run: |
yarn install
yarn check-envfile
yarn build:tools
if [ "${{ matrix.browser }}" = "chrome" ]; then
yarn build:chrome:all
elif [ "${{ matrix.browser }}" = "edge" ]; then
yarn build:edge:all
elif [ "${{ matrix.browser }}" = "firefox" ]; then
yarn build:firefox:all:self-sign
fi