-
Notifications
You must be signed in to change notification settings - Fork 25
128 lines (102 loc) · 2.71 KB
/
main.yml
File metadata and controls
128 lines (102 loc) · 2.71 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
push:
branches:
- main
schedule:
- cron: "0 3 * * 0" # Every sunday at 3am UTC.
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .github/files/.nvmrc
- name: NodeJS version
run: node -v
- name: Corepack
run: corepack enable
- name: Yarn version
run: yarn --version
- name: Install
run: yarn
- name: Build
run: yarn build
validation:
needs: build
name: Code quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Corepack
run: corepack enable
- name: Install
run: yarn
- name: Linting
run: yarn lint
- name: Build on Ubuntu
run: yarn build
- name: All generated code is commited
run: |
git update-index --refresh
git diff-index --exit-code --name-status HEAD --
tests:
needs: validation
strategy:
fail-fast: false
matrix:
runtime: [previous-lts, lts, ci]
name: Tests
uses: ./.github/workflows/tests.yml
with:
runtime: ${{ matrix.runtime }}
secrets: inherit
plugins:
needs: tests
if: false
name: "${{ matrix.group.name }}"
strategy:
fail-fast: false
matrix:
group:
- name: plugins
path: ./src/plugins
env:
# GitHub only passes secrets to the main repo, so we need to skip some things if they are unavailable
SECRETS_AVAILABLE: ${{ secrets.EVENTSTORE_CLOUD_ID != null }}
KURRENT_VERSION: "24.2.0-jammy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .github/files/.nvmrc
- name: NodeJS version
run: node -v
- name: Corepack
run: corepack enable
- name: Login to Cloudsmith
uses: docker/login-action@v3
with:
registry: docker.eventstore.com
username: ${{ secrets.CLOUDSMITH_CICD_USER }}
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
- name: Install
run: yarn
- name: Corepack
run: corepack enable
- name: Build
run: yarn build
- name: Run Tests
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
env:
KURRENT_IMAGE: "docker.eventstore.com/eventstore-ee/eventstoredb-commercial:${{ env.KURRENT_VERSION }}"