Skip to content

Commit

Permalink
Comment out test workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
fergmac committed Aug 7, 2024
1 parent 08dda63 commit 94dc41e
Showing 1 changed file with 91 additions and 91 deletions.
182 changes: 91 additions & 91 deletions .github/workflows/.tests.yml
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
name: .Tests
# name: .Tests

on:
workflow_call:
inputs:
### Required
target:
description: PR number, test or prod
required: true
type: string
# on:
# workflow_call:
# inputs:
# ### Required
# target:
# description: PR number, test or prod
# required: true
# type: string

### Typical / recommended
triggers:
description: Bash array to diff for build triggering; omit to always fire
required: false
type: string
# ### Typical / recommended
# triggers:
# description: Bash array to diff for build triggering; omit to always fire
# required: false
# type: string

env:
DOMAIN: apps.silver.devops.gov.bc.ca
PREFIX: ${{ github.event.repository.name }}-${{ inputs.target }}
# env:
# DOMAIN: apps.silver.devops.gov.bc.ca
# PREFIX: ${{ github.event.repository.name }}-${{ inputs.target }}

jobs:
integration-tests:
name: Integration
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- id: cache-npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-cache-node-modules-
${{ runner.os }}-build-
${{ runner.os }}-
# jobs:
# integration-tests:
# name: Integration
# runs-on: ubuntu-22.04
# timeout-minutes: 1
# steps:
# - uses: actions/checkout@v4
# - id: cache-npm
# uses: actions/cache@v4
# with:
# path: ~/.npm
# key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-cache-node-modules-
# ${{ runner.os }}-build-
# ${{ runner.os }}-

- env:
API_NAME: nest
BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}
run: |
cd tests/integration
npm ci
node src/main.js
# - env:
# API_NAME: nest
# BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}
# run: |
# cd tests/integration
# npm ci
# node src/main.js

e2e-tests:
name: E2E
defaults:
run:
working-directory: frontend
runs-on: ubuntu-22.04
timeout-minutes: 5
strategy:
matrix:
project: [ chromium, Google Chrome, firefox, safari, Microsoft Edge ]
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: actions/setup-node@v4
name: Setup Node
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
npm ci
npx playwright install --with-deps
# e2e-tests:
# name: E2E
# defaults:
# run:
# working-directory: frontend
# runs-on: ubuntu-22.04
# timeout-minutes: 5
# strategy:
# matrix:
# project: [ chromium, Google Chrome, firefox, safari, Microsoft Edge ]
# steps:
# - uses: actions/checkout@v4
# name: Checkout
# - uses: actions/setup-node@v4
# name: Setup Node
# with:
# node-version: 20
# cache: 'npm'
# cache-dependency-path: frontend/package-lock.json
# - name: Install dependencies
# run: |
# npm ci
# npx playwright install --with-deps

- name: Run Tests
env:
E2E_BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
CI: 'true'
run: |
npx playwright test --project="${{ matrix.project }}" --reporter=html
# - name: Run Tests
# env:
# E2E_BASE_URL: https://${{ github.event.repository.name }}-${{ inputs.target }}-frontend.${{ env.DOMAIN }}/
# CI: 'true'
# run: |
# npx playwright test --project="${{ matrix.project }}" --reporter=html

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
name: upload results
with:
name: playwright-report-${{ matrix.project }}
path: "./frontend/playwright-report" # path from current folder
retention-days: 7
# - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# name: upload results
# with:
# name: playwright-report-${{ matrix.project }}
# path: "./frontend/playwright-report" # path from current folder
# retention-days: 7

load-tests:
name: Load
runs-on: ubuntu-22.04
strategy:
matrix:
name: [backend, frontend]
steps:
- uses: actions/checkout@v4
- uses: grafana/k6-action@v0.3.1
env:
BACKEND_URL: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/api
FRONTEND_URL: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}
with:
filename: ./tests/load/${{ matrix.name }}-test.js
flags: --vus 10 --duration 30s
# load-tests:
# name: Load
# runs-on: ubuntu-22.04
# strategy:
# matrix:
# name: [backend, frontend]
# steps:
# - uses: actions/checkout@v4
# - uses: grafana/k6-action@v0.3.1
# env:
# BACKEND_URL: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/api
# FRONTEND_URL: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}
# with:
# filename: ./tests/load/${{ matrix.name }}-test.js
# flags: --vus 10 --duration 30s

0 comments on commit 94dc41e

Please sign in to comment.