-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (77 loc) · 2.22 KB
/
ci.yml
File metadata and controls
78 lines (77 loc) · 2.22 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
# Continuous Integration
#
# References:
#
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
# - https://github.com/actions/checkout
# - https://github.com/hmarr/debug-action
---
name: continuous-integration
on:
pull_request:
push:
branches:
- feat/**
- hotfix/**
- main
workflow_dispatch:
permissions:
packages: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HUSKY: 0
REF: ${{ github.head_ref || github.ref_name }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
if: |
github.event_name == 'pull_request' ||
github.event_name == 'workflow_dispatch' ||
!startsWith(github.event.head_commit.message, 'release:')
runs-on: ubuntu-latest
steps:
- id: debug
name: Print environment variables and event payload
uses: hmarr/debug-action@v2.0.1
- id: checkout
name: Checkout ${{ env.REF }}
uses: actions/checkout@v3.0.2
with:
ref: ${{ env.REF }}
- id: yarn
name: Install dependencies
if: github.actor != 'dependabot[bot]'
run: yarn
- id: yarn-dependabot
name: Install dependencies for dependabot
if: github.actor == 'dependabot[bot]'
run: yarn --no-immutable
- id: format
name: Check code formatting
run: yarn check:format
- id: lint
name: Check lint status
run: yarn check:lint
- id: spelling
name: Check spelling
run: yarn check:spelling
- id: test
name: Run tests
run: yarn test:cov
env:
NODE_ENV: test
NODE_NO_WARNINGS: 1
NODE_OPTIONS: --es-module-specifier-resolution=node
TS_NODE_PROJECT: ./tsconfig.tsnode.json
VITEST_SEGFAULT_RETRY: 3
- id: pack
name: Pack project
run: yarn pack -o %s-%v.tgz
env:
NODE_ENV: production
NODE_NO_WARNINGS: 1
NODE_OPTIONS: --es-module-specifier-resolution=node