Skip to content

Commit

Permalink
Merge pull request #19 from COS301-SE-2024/update/code-quality-badges
Browse files Browse the repository at this point in the history
Update/code quality badges
  • Loading branch information
bukhosi-eugene-mpande authored May 31, 2024
2 parents 88821c1 + cabaadb commit a5cf902
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 7 deletions.
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/[email protected]
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.

0 comments on commit a5cf902

Please sign in to comment.