-
Notifications
You must be signed in to change notification settings - Fork 38
89 lines (70 loc) · 3.38 KB
/
Copy pathNodeLatest.yml
File metadata and controls
89 lines (70 loc) · 3.38 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
name: tests/node-latest
# Early-warning canary for new Node.js releases.
#
# Node.js ships a new major every 6 months (April/October) and minor/patch
# releases of the current line roughly every 2-4 weeks, so a weekly run is
# enough to catch a breaking release within days. The regular test matrix
# (RavenClient.yml) pins concrete lines; this workflow always resolves the
# newest available versions instead.
permissions:
contents: read
on:
schedule:
- cron: '0 10 * * 1' # Mondays 10:00 UTC
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# `nightly` is allowed to fail: it exists to spot upstream breaks early
# (like the undici dispatch handler protocol changes), not to gate anything.
continue-on-error: ${{ matrix.node-version == 'nightly' }}
env:
RAVENDB_TEST_SERVER_PATH: ./RavenDB/Server/Raven.Server
RAVENDB_TEST_SERVER_CERTIFICATE_PATH: ./certs/server.pfx
RAVENDB_TEST_CLIENT_CERT_PASSPHRASE: client11
RAVENDB_TEST_CLIENT_CERT_PATH: ./certs/nodejs.pem
RAVENDB_TEST_CA_PATH: /usr/local/share/ca-certificates/ca.crt
RAVENDB_TEST_HTTPS_SERVER_URL: https://localhost:8989
RAVENDB_BUILD_TYPE: nightly
RAVEN_License: ${{ secrets.RAVEN_LICENSE }}
RAVENDB_SERVER_VERSION: ${{ matrix.serverVersion }}
strategy:
matrix:
# `latest` = newest stable release (any line), `nightly` = tip of main.
node-version: [latest, nightly]
serverVersion: ["7.2"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Print resolved Node.js version
run: node --version
- name: Download RavenDB Server
run: wget -O RavenDB.tar.bz2 "https://hibernatingrhinos.com/downloads/RavenDB%20for%20Linux%20x64/latest?buildType=${{ env.RAVENDB_BUILD_TYPE }}&version=${{ matrix.serverVersion }}"
- run: mkdir certs
- run: openssl genrsa -out certs/ca.key 2048
- run: openssl req -new -x509 -key certs/ca.key -out certs/ca.crt -subj "/C=US/ST=Arizona/L=Nevada/O=RavenDB Test CA/OU=RavenDB test CA/CN=localhost/emailAddress=ravendbca@example.com"
- run: openssl genrsa -traditional -out certs/localhost.key 2048
- run: openssl req -new -key certs/localhost.key -out certs/localhost.csr -subj "/C=US/ST=Arizona/L=Nevada/O=RavenDB Test/OU=RavenDB test/CN=localhost/emailAddress=ravendb@example.com" -addext "subjectAltName = DNS:localhost"
- run: openssl x509 -req -extensions ext -extfile test/Assets/test_cert.conf -in certs/localhost.csr -CA certs/ca.crt -CAkey certs/ca.key -CAcreateserial -out certs/localhost.crt
- run: cat certs/localhost.key certs/localhost.crt > certs/nodejs.pem
- run: openssl pkcs12 -passout pass:"" -export -out certs/server.pfx -inkey certs/localhost.key -in certs/localhost.crt
- run: sudo cp certs/ca.crt /usr/local/share/ca-certificates/ca.crt
- run: sudo update-ca-certificates
- name: Extract RavenDB Server
run: tar xjf RavenDB.tar.bz2
- run: npm ci
- name: Run Tests
run: npm run test
- name: Build
run: npm pack
- name: Check imports CommonJS
run: node scripts/checkImports.cjs
- name: Check imports ESM
run: node scripts/checkImports.mjs
- name: Check imports
run: npm run check-imports