Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/code quality badges #19

Merged
merged 6 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
@@ -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 }}
35 changes: 35 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 1 addition & 3 deletions src/client/src/routes/sverdle/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Binary file added src/server/workspace/bun.lockb
Binary file not shown.
Loading