-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.14 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
name: CI
on:
workflow_dispatch:
push:
branches: ['**']
paths-ignore: ['*.adoc']
pull_request:
branches: [main]
paths-ignore: ['*.adoc']
schedule:
- cron: '45 2 * * TUE'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
activate:
if: >-
github.event_name == 'push' ||
(github.event_name == 'schedule' && github.repository_owner == 'spring-io') ||
(github.event_name == 'pull_request' && !startsWith(github.head_ref, 'docs/'))
runs-on: ubuntu-latest
steps:
- name: Proceed
run: echo ok go
build:
needs: activate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run linter
run: |
npm run lint
if [ -n "$(npm --silent run format && git --no-pager diff --name-only)" ]; then
echo 'Detected pending code style changes'
exit 1
fi
- name: Run tests with coverage
run: npm run coverage-strict