-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
58 lines (45 loc) Β· 1.39 KB
/
e2e-next-workflow.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
on:
schedule:
- cron: '0 */4 * * *'
push:
branches:
- master
pull_request:
paths:
- .github/actions/prepare/action.yml
- .github/workflows/e2e-next-workflow.yml
- scripts/e2e-setup-ci.sh
name: 'E2E Next'
jobs:
chore:
name: 'Validating Next.js'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/prepare
- name: 'Running the integration test, without TypeScript'
run: |
source scripts/e2e-setup-ci.sh
yarn init
# Required
yarn add next@canary react react-dom
# Test itself
yarn add raw-loader
mkdir pages
echo 'import text from "raw-loader!./text.txt"; export default () => <div>{text}</div>;' | tee pages/index.js
echo 'hello world!' | tee pages/text.txt
yarn next build
- name: 'Running the integration test, with TypeScript'
run: |
source scripts/e2e-setup-ci.sh
yarn init
# Required
yarn add typescript next@canary react react-dom @types/react @types/react-dom @types/node
# Test itself
yarn add raw-loader
mkdir pages
echo 'const text = require("raw-loader!./text.txt").default; export default () => <div>{text}</div>;' | tee pages/home.tsx
echo 'hello world!' | tee pages/text.txt
yarn next build
if: |
success() || failure()