-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (69 loc) · 2.4 KB
/
nodejs.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
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
name: Build Project
on:
pull_request:
jobs:
build:
strategy:
matrix:
# node-version: [18.x, 20.x, 22.x]
# os: [macos-latest, ubuntu-latest, windows-latest]
# TODO use all versions and os
node-version: [22.x]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up JDK for Liquibase CLI
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Install and Run Docker in WSL
if: runner.os == 'Windows'
run: |
# Enable WSL and Virtual Machine Platform
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
# Set WSL Version 2 as default
wsl --set-default-version 2
# Install Ubuntu WSL distribution
wsl --install
# Update Ubuntu and install Docker in WSL
wsl sudo apt-get update
wsl sudo apt-get install -y docker.io
# Start Docker Daemon
wsl sudo service docker start
- name: Check Docker Version
run: wsl docker --version
if: runner.os == 'Windows'
- name: Check Docker Version
if: runner.os != 'Windows'
run: docker --version
- name: Check Node.js version
run: node -v
- name: Check npm versions
run: npm -v
- name: Run clean install
run: npm ci
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: run e2e tests
run: xvfb-run -a npm run test:e2e -- --storage ./out/test-resources/${{ matrix.os }}/${{ matrix.node-version }}
if: runner.os == 'Linux'
- name: npm e2e tests
run: npm run test:e2e -- --storage ./out/test-resources/${{ matrix.os }}/${{ matrix.node-version }}
if: runner.os != 'Linux'
- name: "Upload e2e screenshots"
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-screenshots
path: ./out/test-resources/**/screenshots/**
retention-days: 5
if-no-files-found: ignore