Skip to content

Commit

Permalink
Only trigger relevant Github Workflows (#2710)
Browse files Browse the repository at this point in the history
* simplify github workflow checks

* fix unused dep
  • Loading branch information
sipec committed Jul 9, 2024
1 parent c0403a5 commit 941d75c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 21 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,24 @@ jobs:
cache: 'yarn'
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
- name: Build common
working-directory: common
run: yarn build
- name: Run Typescript checker on web client
if: ${{ success() || failure() }}
working-directory: web
run: tsc --pretty --project tsconfig.json --noEmit
- name: Run Typescript checker on cloud functions
- name: Build shared
if: ${{ success() || failure() }}
working-directory: backend/shared
run: yarn build
- name: Run Typescript checker on API
working-directory: backend/api
run: tsc --noEmit --skipLibCheck --pretty
- name: Lint API
if: ${{ success() }}
working-directory: backend/api
run: yarn verify:dir
- name: Run Typescript checker on scheduler
if: ${{ success() || failure() }}
working-directory: backend/functions
run: tsc -b -v --pretty
working-directory: backend/scheduler
run: tsc --noEmit --skipLibCheck --pretty
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Reformat main
name: Reformat web

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -7,6 +7,9 @@ concurrency:
on:
push:
branches: [main]
paths:
- 'web/**'
- 'common/**'

env:
FORCE_COLOR: 3
Expand All @@ -16,7 +19,7 @@ env:
# why, but the default token didn't work, even when i gave it max permissions

jobs:
prettify:
prettify-main:
name: Auto-prettify
runs-on: ubuntu-latest
permissions:
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@ name: Unit tests
on:
push:
branches: [main]
paths:
- 'common/**'
pull_request:
branches: [main]
paths:
- 'common/**'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
working-directory: ./common
- name: Run lint
run: yarn lint
- name: Run unit tests
run: yarn test
working-directory: ./common
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'yarn'
- name: Install dependencies
run: yarn install --prefer-offline --frozen-lockfile
working-directory: ./common
- name: Run lint
run: yarn lint
- name: Run unit tests
run: yarn test
working-directory: ./common
1 change: 0 additions & 1 deletion backend/api/src/gidx/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const ENDPOINT =
export const register: APIHandler<'register-gidx'> = async (
props,
auth,
req
) => {
if (!GIDX_REGISTATION_ENABLED)
throw new APIError(400, 'GIDX registration is disabled')
Expand Down

0 comments on commit 941d75c

Please sign in to comment.