Wes/sync2 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |