Files
Sankofa/.github/workflows/portal-ci.yml
T

103 lines
3.2 KiB
YAML

name: Portal CI
on:
push:
branches: [main, develop]
paths:
- 'portal/**'
- '.github/workflows/portal-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'portal/**'
jobs:
lint:
name: Portal Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./portal
steps:
- uses: actions/checkout@v4
# PROJECT_ATLAS_SSH_PRIVATE_KEY must be a read-only deploy key for [email protected]:Sankofa_Phoenix/projectAtlas.git
- name: Bootstrap Project Atlas submodule
env:
PROJECT_ATLAS_SSH_PRIVATE_KEY: ${{ secrets.PROJECT_ATLAS_SSH_PRIVATE_KEY }}
run: bash ./scripts/ci/bootstrap-project-atlas-submodule.sh
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: portal/package-lock.json
- run: npm ci
- run: npm run lint
type-check:
name: Portal Type Check
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./portal
steps:
- uses: actions/checkout@v4
# PROJECT_ATLAS_SSH_PRIVATE_KEY must be a read-only deploy key for [email protected]:Sankofa_Phoenix/projectAtlas.git
- name: Bootstrap Project Atlas submodule
env:
PROJECT_ATLAS_SSH_PRIVATE_KEY: ${{ secrets.PROJECT_ATLAS_SSH_PRIVATE_KEY }}
run: bash ./scripts/ci/bootstrap-project-atlas-submodule.sh
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: portal/package-lock.json
- run: npm ci
- run: npm run type-check
test:
name: Portal Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./portal
steps:
- uses: actions/checkout@v4
# PROJECT_ATLAS_SSH_PRIVATE_KEY must be a read-only deploy key for [email protected]:Sankofa_Phoenix/projectAtlas.git
- name: Bootstrap Project Atlas submodule
env:
PROJECT_ATLAS_SSH_PRIVATE_KEY: ${{ secrets.PROJECT_ATLAS_SSH_PRIVATE_KEY }}
run: bash ./scripts/ci/bootstrap-project-atlas-submodule.sh
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: portal/package-lock.json
- run: npm ci
- run: npm test -- --coverage
- uses: codecov/codecov-action@v3
with:
files: ./portal/coverage/coverage-final.json
flags: portal
name: codecov-portal
build:
name: Portal Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./portal
steps:
- uses: actions/checkout@v4
# PROJECT_ATLAS_SSH_PRIVATE_KEY must be a read-only deploy key for [email protected]:Sankofa_Phoenix/projectAtlas.git
- name: Bootstrap Project Atlas submodule
env:
PROJECT_ATLAS_SSH_PRIVATE_KEY: ${{ secrets.PROJECT_ATLAS_SSH_PRIVATE_KEY }}
run: bash ./scripts/ci/bootstrap-project-atlas-submodule.sh
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: portal/package-lock.json
- run: npm ci
- run: npm run build