Skip to content

Merge branch 'develop' into feature/GAP-2218-submit-after-closing #357

Merge branch 'develop' into feature/GAP-2218-submit-after-closing

Merge branch 'develop' into feature/GAP-2218-submit-after-closing #357

Workflow file for this run

name: Feature Workflow
on:
push:
branches:
- feature/**
- AFG-**
- GAP-**
- fix/**
- bug/**
- TMI2-**
paths-ignore:
- "*.md"
jobs:
build:
name: Build Feature
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Generate .env files
run: |
cp packages/admin/.env.example packages/admin/.env
sed -i -e '/TINYMCE_API_KEY=/s/$/${{ secrets.TINYMCE_API_KEY }}/g' packages/admin/.env
cp packages/applicant/.env.example packages/applicant/.env
- name: Read .nvmrc
run: echo "::set-output name=NVMRC::$(cat .nvmrc)"
id: nvm
- name: Setup node
uses: actions/setup-node@master
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
- name: Read yarn cache directory path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
id: yarn-cache-dir-path
- name: Restore cached dependencies
uses: actions/cache/restore@v3
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn install --immutable
- name: Save cached dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Snyk setup
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --yarn-workspaces --strict-out-of-sync=false
- name: Lint files
run: |
yarn lint
- name: Build application
run: |
yarn build
- name: Units Tests
run: |
yarn coverage
- name: Cache application build
uses: actions/cache@v2
id: build-cache
with:
path: |
${{ github.workspace }}/.next/cache
key: gap-cache-build-${{ github.event.pull_request.head.sha }}