-
Notifications
You must be signed in to change notification settings - Fork 37
60 lines (57 loc) · 1.44 KB
/
main.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
---
name: CI
on: [push, pull_request]
env:
MAIN_NODE_VERSION: "16"
jobs:
static-checks:
runs-on: ubuntu-latest
name: Run static checks
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.MAIN_NODE_VERSION }}
- run: corepack enable
- run: yarn install
- run: yarn run lint
- run: yarn run types
tests:
needs: [static-checks]
runs-on: ubuntu-latest
name: Run tests
strategy:
matrix:
node: ["18", "20", "21"]
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: corepack enable
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn run test --coverage
- name: Publish code coverage
if: "${{ env.CC_TEST_REPORTER_ID != '' }}"
uses: paambaati/[email protected]
build:
needs: [tests]
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.MAIN_NODE_VERSION }}
- run: corepack enable
- run: yarn install
- run: yarn run build
- uses: actions/upload-artifact@v4
with:
name: babel-plugin-i18next-extract
path: lib/