Skip to content

Implement ID views override user pages #2166

Implement ID views override user pages

Implement ID views override user pages #2166

Workflow file for this run

---
name: Gating tests
on:
pull_request:
push:
branches: [main, devel]
env:
GITHUB_CI: true
jobs:
audit-and-build:
name: Audit and build
runs-on: ubuntu-20.04
container:
image: fedora:latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Audit dependencies
run: npx audit-ci --config audit-ci.json --skip-dev
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install project
run: npm install
- name: Prettier
run: npm run prettier
- name: Lint
run: npm run lint
- name: Build project
run: npm run build
- name: Upload dist folder
uses: actions/upload-artifact@v4
with:
name: freeipa-webui-build
path: dist/
unit-tests:
name: Unit tests
needs: audit-and-build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install project
run: npm install
- name: Run jest
run: npm run test
integration-tests:
name: Integration tests
needs: audit-and-build
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install vagrant
run: |
sudo apt -y install apt-transport-https ca-certificates curl software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update
sudo apt install vagrant vagrant-sshfs virtualbox
- uses: actions/download-artifact@v4
with:
name: freeipa-webui-build
path: dist
- name: Run vagrant up
run: vagrant up --no-provision --provider=virtualbox
- name: Run vagrant provision
run: vagrant provision
- name: Put IPA Server's IP to /etc/hosts
run: sudo echo "$(vagrant ssh -c "hostname -I|sed 's/10\.0\.2\.15//'") server.ipa.demo" | sudo tee -a /etc/hosts
- name: Save server's IP address to env
run: echo "SERVER_IP=$(vagrant ssh -c "hostname -I|sed 's/10\.0\.2\.15//'")" >> $GITHUB_ENV
- name: Print exported variable
run: echo "$SERVER_IP"
- name: Run Cypress tests
uses: cypress-io/github-action@v6
with:
browser: electron
config-file: cypress/cypress.config.ts
- name: Upload cypress screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload cypress videos
uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
path: cypress/videos