Skip to content

Wes/sync2

Wes/sync2 #12

Workflow file for this run

name: Unit/Integration tests
on: pull_request
jobs:
setup-env:
name: "Load ENV Vars"
uses: ./.github/workflows/setup-env.yml
secrets: inherit
run-jest-tests:
name: Jest Tests
runs-on: ubuntu-latest
needs: [setup-env]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up NodeJS
uses: actions/setup-node@v4
with:
node-version: "lts/Iron"
check-latest: true
- name: Install all dependencies
run: |
npm ci
- run: npm run copyTestPreferences
- name: "Create env file"
env:
env_vars: ${{ needs.setup-env.outputs.env_vars }}
run: |
ENV_FILE_PATH=./apps/server/.env
touch ${ENV_FILE_PATH}
# Vars
echo -e "${{ env.env_vars }}" >> ${ENV_FILE_PATH}
# Secrets (can't load these from another job, due to GH security features)
- name: Run Jest Tests
run: |
npm run test