Skip to content

chore: migrate from gitlab to GitHub #14

chore: migrate from gitlab to GitHub

chore: migrate from gitlab to GitHub #14

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: Set up WSL for Windows
if: runner.os == 'Windows'
uses: Vampire/setup-wsl@v3
with:
distribution: Ubuntu-20.04
- name: Install and Run Docker in WSL
shell: wsl-bash {0}
if: runner.os == 'Windows'
run: |
# Update Ubuntu and install Docker in WSL
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Start Docker Daemon
sudo service docker start
- name: Check Docker Version
shell: wsl-bash {0}
run: 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