Skip to content

Commit

Permalink
initial jest testing (#924)
Browse files Browse the repository at this point in the history
* initial jest testing

* add to git actions

* testing to see if this fixes our craco tests

* testing to see if this fixes our craco tests

* fix exports of helpers

* added configs for both jest and craco to use

* seperated workflows and renamed them to be clearer
  • Loading branch information
kevkevinpal authored Nov 10, 2023
1 parent 2544049 commit 7c14791
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 54 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/prjob_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build
on:
pull_request:
branches:
- master
jobs:
build:
name: build
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn --cwd ./frontend/app install
- name: Build
run: CI=false yarn --cwd ./frontend/app run build

17 changes: 17 additions & 0 deletions .github/workflows/prjob_eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Eslint
on:
pull_request:
branches:
- master
jobs:
eslint:
name: eslint
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn --cwd ./frontend/app install
- name: Eslint
run: yarn --cwd ./frontend/app run lint

18 changes: 18 additions & 0 deletions .github/workflows/prjob_prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Prettier
on:
pull_request:
branches:
- master
jobs:

prettier:
name: prettier
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn --cwd ./frontend/app install
- name: Prettier
run: CI=false yarn --cwd ./frontend/app run prettier:check

34 changes: 34 additions & 0 deletions .github/workflows/prjob_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests
on:
pull_request:
branches:
- master
jobs:
test:
name: Craco
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn --cwd ./frontend/app install
- name: Tests
run: NODE_OPTIONS="--max_old_space_size=8192" yarn --cwd ./frontend/app run test
- name: Set up Golang
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Go Test
run: go test -v ./...

test-jest:
name: Jest
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install modules
run: yarn --cwd ./frontend/app install
- name: Tests
run: NODE_OPTIONS="--max_old_space_size=8192" yarn --cwd ./frontend/app run test-jest

54 changes: 0 additions & 54 deletions .github/workflows/pull_request.yml

This file was deleted.

0 comments on commit 7c14791

Please sign in to comment.