Merge pull request #412 from COS301-SE-2024/stablization #97
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: Test | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- stablization | |
- feature/hotfix | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
build_backend: | |
name: Build Backend | |
runs-on: ubuntu-latest | |
env: | |
SUPABASE_URL: https://mocked-supabase-url.supabase.co | |
SUPABASE_ANON_KEY: mockedKey | |
SECRET_ENCRYPTION_KEY: mockedEncryptionKey= | |
ACCESS_KEY: MockedAccessKey | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Install backend dependencies | |
run: | | |
cd Backend | |
npm install | |
npm install --save-dev babel-plugin-istanbul | |
npm install -g coveralls | |
- name: Run backend tests | |
run: | | |
cd Backend | |
npm run test | |
build_frontend: | |
name: Build Frontend | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Install frontend dependencies | |
run: | | |
cd Frontend | |
npm install | |
npm install --save-dev babel-plugin-istanbul | |
npm install -g coveralls | |
- name: Run frontend tests | |
run: | | |
cd Frontend | |
npm run test | |
debug: | |
name: Debug Workspace | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Debug Backend Workspace | |
run: | | |
echo "Listing files in Backend directory:" | |
ls -la Backend | |
echo "Displaying package.json in Backend directory:" | |
cat Backend/package.json | |
- name: Debug Frontend Workspace | |
run: | | |
echo "Listing files in Frontend directory:" | |
ls -la Frontend | |
echo "Displaying package.json in Frontend directory:" | |
cat Frontend/package.json |