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 d94994f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
47 changes: 23 additions & 24 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,18 @@ 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
display:
name: display
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
- name: Use variables
run: |
echo "app title: ${{ vars.APP_TITLE }}"
echo "app title: ${{ vars.APP_GRAPHQL_CODEGEN_ENDPOINT }}"
unimported:
name: Find unimported files
runs-on: ubuntu-latest
Expand All @@ -38,7 +32,7 @@ jobs:
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- name: Run unimported
run: yarn unimported
Expand All @@ -47,16 +41,19 @@ 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
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- 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 @@ -68,7 +65,7 @@ jobs:
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- name: Css Lint
run: yarn lint:css
Expand All @@ -77,19 +74,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- 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 @@ -99,7 +98,7 @@ jobs:
cache: 'yarn'

- name: Install dependencies
run: yarn install
run: yarn install --frozen-lockfile

- 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 d94994f

Please sign in to comment.