-
-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (47 loc) · 1.54 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
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
types: [synchronize, opened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: 1
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Install yarn and cache dependencies
- uses: bahmutov/npm-install@v1
with:
install-command: yarn --frozen-lockfile --silent
- name: Persist Next.js Cache
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Build project
run: yarn build
# Track bundle sizes and display in PR
- uses: jackyef/bundlewatch-gh-action@master
with:
bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
- name: Lint Action
uses: wearerequired/lint-action@v1.7.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
eslint: true
eslint_extensions: js,jsx,ts,tsx
eslint_args: "--max-warnings 0"
prettier: true
- uses: mattallty/jest-github-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# this is just an example, this could be any command that will trigger jest
test-command: "yarn test:ci"
coverage-comment: false