Skip to content

Commit

Permalink
feat: integrate backend using git submodules to fix CI lint workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Apr 11, 2024
1 parent 646d94b commit e7853d6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
33 changes: 12 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint, Build and Test
name: Lint & Build

on:
pull_request:
Expand All @@ -9,24 +9,10 @@ on:
env:
APP_TITLE: ${{ vars.APP_TITLE }}
APP_MAPBOX_ACCESS_TOKEN: ${{ vars.APP_MAPBOX_ACCESS_TOKEN }}
APP_GRAPHQL_CODEGEN_ENDPOINT: ${{ vars.APP_GRAPHQL_CODEGEN_ENDPOINT }}
GITHUB_WORKFLOW: true

jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Run test
run: yarn test
unimported:
name: Find unimported files
runs-on: ubuntu-latest
Expand All @@ -47,6 +33,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -55,8 +44,8 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Lint
run: yarn lint:js
- name: Lint Javascript
run: yarn generate && yarn lint:js
css-lint:
name: Lint CSS
runs-on: ubuntu-latest
Expand All @@ -77,6 +66,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
Expand All @@ -86,10 +77,10 @@ jobs:
run: yarn install

- name: Typecheck
run: yarn typecheck
run: yarn generate && yarn typecheck
build:
name: Build
needs: [lint-js, css-lint, typecheck, test]
needs: [lint-js, css-lint, typecheck]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -102,4 +93,4 @@ jobs:
run: yarn install

- name: Build
run: yarn build
run: yarn generate && yarn build
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "backend"]
path = backend
url = [email protected]:IFRCGo/alert-hub-backend.git
1 change: 1 addition & 0 deletions backend
Submodule backend added at 2ff119

0 comments on commit e7853d6

Please sign in to comment.