Skip to content

Project day merge

Project day merge #954

Workflow file for this run

name: Lint Build and Test
on:
pull_request:
branches: [master, development]
push:
branches: [master, development]
permissions:
contents: read
jobs:
lint-build-test-deploy:
timeout-minutes: 5
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SRV_KEY }}
NEXT_PUBLIC_SUPABASE_ANON_PUBLIC_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
NEXT_PUBLIC_SENTRY_DSN_LINK: ${{secrets.NEXT_PUBLIC_SENTRY_DSN_LINK}}
NEXT_PUBLIC_SENTRY_ORG: ${{secrets.NEXT_PUBLIC_SENTRY_ORG}}
NEXT_PUBLIC_SENTRY_PROJECT: ${{secrets.NEXT_PUBLIC_SENTRY_PROJECT}}
steps:
- name: Code Checkout
uses: actions/checkout@v2
- name: Change to repository root
run: cd $GITHUB_WORKSPACE
- name: Print new build number
run: echo "Build number is $BUILD_NUMBER"
- name: Install dependencies
run: |
cd wee && npm install
- name: Lint
run: |
cd wee
npx nx lint webscraper
npx nx lint api-service
npx nx lint frontend
echo "================== lint complete =================="
- name: Build
run: |
cd wee
npx nx build webscraper
npx nx build api-service
npx nx build frontend
echo "================== build complete =================="
#bash ${GITHUB_WORKSPACE}/.github/workflows/scripts/lint.sh
#continue-on-error: true
- name: Jest Tests
run: |
cd wee
npx nx test webscraper --coverage=true
npx nx test api-service --coverage=true
npx nx test frontend --coverage=true
echo "================== jest tests complete =================="
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
run-cypress-tests:
name: Frontend Integration Tests
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SRV_KEY }}
NEXT_PUBLIC_SENTRY_DSN_LINK: ${{secrets.NEXT_PUBLIC_SENTRY_DSN_LINK}}
NEXT_PUBLIC_SENTRY_ORG: ${{secrets.NEXT_PUBLIC_SENTRY_ORG}}
NEXT_PUBLIC_SENTRY_PROJECT: ${{secrets.NEXT_PUBLIC_SENTRY_PROJECT}}
NEXT_PUBLIC_TESTING_ENVIRONMENT: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js 21
uses: actions/setup-node@v4
with:
node-version: 21
- name: Install dependencies
run: |
cd wee/frontend
npm ci
- name: Start application
run: |
echo "================== deployment complete =================="
#bash ${GITHUB_WORKSPACE}/.github/workflows/scripts/deploy.sh
#continue-on-error: true