-
-
Notifications
You must be signed in to change notification settings - Fork 763
88 lines (68 loc) · 2.22 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
84
85
86
87
88
name: CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
paths-ignore:
- 'docs/**'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: 📥 Install
run: npm install
- name: Install Examples
run: npm run install:examples
- name: ⓘ Debug next-i18next installation
shell: bash
run: npx envinfo --binaries --npmPackages
- name: Typecheck
run: npm run typecheck
- name: Prettier
run: npm run prettier
- name: Unit tests
run: npm test
- name: ESLint checks
run: npm run lint
- name: Build next-i18next
run: npm run build
- name: Check dist for ecmascript compliance
run: npm run check-dist
# Temporary hack that replace the ./node_modules/next-i18next content
# by the current build. This is needed cause next-i18next does not work (yet) when the
# build is below current dir. There's few issues left notably that webpack does not play
# well with dynamic import of next-i18next config (and there might not be solution to this).
# @link https://github.com/i18next/next-i18next/pull/2012
# (see also the npm file: in package.json)
- name: Replace examples install with repo build
run: npm run move-build-to-examples
- name: ⓘ Debug example/simple installation
shell: bash
run: npx envinfo --binaries --npmPackages
- name: Build examples
run: npm run build:examples
- name: Check size limits
run: npm run check-size
- name: E2E tests
run: npm run test:e2e
- name: Build example with experimental.esmExternals
run: npm run build:example:simple
env:
NEXTJS_ESM_EXTERNALS: true
- name: Typecheck simple example
run: npm run typecheck:example:simple