Skip to content

Do tests outside

Do tests outside #40

Workflow file for this run

on:
push:
tags:
- '*.*'
- '*.*.*'
branches:
- '*'
workflow_dispatch: # Manually invoked by user.
name: ci-build
env:
NODE_VERSION: 20
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: npm ci
- name: Check
shell: bash
run: npm run check
- name: Install playwright
shell: bash
run: npx playwright install --with-deps
- name: Test
shell: bash
run: npm test
build-container:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/containerize
with:
registry: ghcr.io
registry-path: ${{ github.repository_owner }}/frontend
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
artifact-name: frontend
push-image: ${{ github.ref_type == 'branch' && github.event_name != 'pull_request' && (github.ref_name == 'master' || github.ref_name == 'develop') }}
trigger-deployment:
runs-on: ubuntu-latest
needs: build-container
if: ${{ github.ref_type == 'branch' && github.event_name != 'pull_request' && github.ref_name == 'master' }}
environment: production
steps:
- name: Call deployment webhook
shell: bash
env:
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
run: |
curl -X POST -d "" "$WEBHOOK_URL"