Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Move gwells backend and fronted to root folder. Dockerfile's moved to related app root folder. #29

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .DS_Store
Binary file not shown.
17 changes: 3 additions & 14 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Bug
about: Create a report to help us improve
about: An undesirable behaviour that needs correction
title: ''
labels: bug
labels: ''
assignees: ''

---
Expand All @@ -14,22 +14,11 @@ A clear and concise description of what the bug is.
A clear and concise description of what you expected to happen.

**Actual Behaviour**
A clear and concise description of what you expected to happen.
A clear and concise description of what actually happens.

** Steps To Reproduce**
Steps to reproduce the behaviour:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---
name: Task
about: Work for the team that cannot be written as a user story
about: Any work that does not directly impact the user
title: ''
labels: task
labels: Task
assignees: ''

---

**Describe the task**
A clear and concise description of what the task is.

**Purpose**
The reason why this task is needed and/or what value it adds.

**Acceptance Criteria**
- [ ] first
- [ ] second
Expand Down
2 changes: 1 addition & 1 deletion .github/codeowners
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Matched against repo root (asterisk)
# * @mishraomp @DerekRoberts
* @bcgov/sustainment-team @DerekRoberts

# Matched against directories
# /.github/workflows/ @mishraomp @DerekRoberts
Expand Down
File renamed without changes.
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
Loading
Loading