Skip to content

Commit

Permalink
chore: add GitHub Actions workflow to test builds (#121)
Browse files Browse the repository at this point in the history
* chore: add Github action to test builds

* fix: remove 14 and 16 Node

* fix: remove npm run test

* chore: update yml

* ci: add linting

* Rename node.js.yml to run-checks.yml

* ci: rename job

* chore: remove outdated comments
  • Loading branch information
KevinWu098 authored May 17, 2024
1 parent fae2cad commit e4f055b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/run-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run Checks

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
run-checks:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build React project
run: npm run build

- name: Run linter
run: npm run lint
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build
public/static
node_modules
node_modules
*.yml
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"postbuild": "cp build/index.html build/404.html",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "npx prettier --write ."
"format": "npx prettier --write .",
"lint": "eslint src"
},
"eslintConfig": {
"extends": [
Expand Down

0 comments on commit e4f055b

Please sign in to comment.