diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml new file mode 100644 index 00000000..646cf513 --- /dev/null +++ b/.github/workflows/backend-tests.yml @@ -0,0 +1,33 @@ +name: Run Backend Tests +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + build: + name: Run ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.17.0 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - name: Install dependencies for the backend + run: bun install + working-directory: src/server/workspace + - name: Run Backend Tests + run: bun run test + working-directory: src/server/workspace + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..cdd2acba --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,35 @@ +name: Run ESLint on Push and Pull Requests +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + build: + name: Run ESLint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 18.17.0 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + - name: Install dependencies for the frontend + run: bun install + working-directory: src/client + - name: Install dependencies for the backend + run: bun install + working-directory: src/server/workspace + - name: Run Frontend Linters + run: bun run lint + working-directory: src/client + - name: Run Backend Linters + run: bun run lint + working-directory: src/server/workspace \ No newline at end of file diff --git a/README.md b/README.md index a0a53328..74ca6c55 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,17 @@ # Phantom Works - ClassConnect -![Coverage](#) -![Build](#) -![Lint](#) -![Test](#) +[![ESLint](https://github.com/COS301-SE-2024/ClassConnect/actions/workflows/linter.yml/badge.svg)](https://github.com/COS301-SE-2024/ClassConnect/actions/workflows/linter.yml) + +[![Build Status](https://img.shields.io/badge/Build_Status-GitHub_Actions-brightgreen)](https://github.com/COS301-SE-2024/ClassConnect/actions/workflows/linter.yml) + +[![Issue Tracking](https://img.shields.io/badge/Issue_Tracking-GitHub_Issues-yellow)](https://github.com/COS301-SE-2024/ClassConnect/issues) + +[![codecov](https://codecov.io/github/COS301-SE-2024/ClassConnect/graph/badge.svg?token=W2cOxCJT1g)](https://codecov.io/github/COS301-SE-2024/ClassConnect) + +![Uptime Robot status](https://img.shields.io/uptimerobot/status/m797015486-75c486778a8f87b141372bd7) + +[![Requirements Status](https://img.shields.io/badge/Requirements-requires.io-orange)](link_to_requires_io) + ### Description of ClassConnect diff --git a/src/client/src/routes/sverdle/+page.svelte b/src/client/src/routes/sverdle/+page.svelte index 8bf30024..6fa44180 100644 --- a/src/client/src/routes/sverdle/+page.svelte +++ b/src/client/src/routes/sverdle/+page.svelte @@ -58,9 +58,7 @@ * if client-side JavaScript is enabled */ function update(event: MouseEvent) { - const key = (event.target as HTMLButtonElement).getAttribute( - 'data-key' - ); + const key = (event.target as HTMLButtonElement).getAttribute('data-key'); if (key === 'backspace') { currentGuess = currentGuess.slice(0, -1); diff --git a/src/server/workspace/bun.lockb b/src/server/workspace/bun.lockb new file mode 100755 index 00000000..b9758970 Binary files /dev/null and b/src/server/workspace/bun.lockb differ