Skip to content

chore: migrate from gitlab to GitHub #11

chore: migrate from gitlab to GitHub

chore: migrate from gitlab to GitHub #11

Workflow file for this run

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: Enable WSL and Virtual Machine Platform
if: runner.os == 'Windows'
run: |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- name: Check WSL Version and Status
if: runner.os == 'Windows'
run: |
wsl --list --verbose
wsl --list --online
wsl --status
- name: Update WSL
if: runner.os == 'Windows'
run: wsl --update
- name: Install Ubuntu 22.04
if: runner.os == 'Windows'
run: wsl --install -d Ubuntu-22.04
- 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
# Update the WSL
wsl --update
# list all distros
wsl --list
# list all available distros
wsl --list --online
# Set WSL Version 2 as default
wsl --set-default-version 2
# Install Ubuntu WSL distribution
wsl --install Ubuntu-22.04
# Set Ubuntu as default distribution (optional, if multiple distributions are installed)
wsl --set-default Ubuntu-22.04
# 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