Repository navigation
54 lines (43 loc) · 1.37 KB
/
Copy pathci.yml
File metadata and controls
54 lines (43 loc) · 1.37 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
# What holds true of this repository, every time again.
#
# One job, because every step is quick: the tests compile the SCSS with
# dart-sass in-process, and the build is two Vite passes over the same
# source. Lint, formatting and types first, since they fail fastest; then
# the tests with coverage; then the build, because a theme that tests
# green and does not compile into dist/ is not done.
name: CI
on:
push:
branches: [main, dev]
pull_request:
workflow_dispatch:
# A new push to the same branch makes the previous one redundant.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Nothing here writes anything back. Every dependency, stylescape core
# included, comes from the public npm registry.
permissions:
contents: read
jobs:
check:
name: Lint, formatting, types, tests and builds
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
- name: ESLint
run: npm run lint
- name: Formatting (Prettier)
run: npm run format:check
- name: Typecheck (tsc)
run: npm run typecheck
- name: Tests with coverage (node:test)
run: npm run coverage
- name: The build has to work
run: npm run build