Skip to content

Merge pull request #596 from dzcode-io/cleanup-repo-sec-issues #103

Merge pull request #596 from dzcode-io/cleanup-repo-sec-issues

Merge pull request #596 from dzcode-io/cleanup-repo-sec-issues #103

Workflow file for this run

name: "CI Check for main Branch"
on:
push:
branches:
- main
jobs:
install-build-lint-test-coverage-misc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [20.x]
os: [macos-latest, ubuntu-latest, windows-latest]
fail-fast: false
steps:
- name: "Git"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Nodejs"
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: "Install"
shell: bash
run: |
npm ci
- name: "Build"
shell: bash
run: |
npm run build
- name: "Lint"
shell: bash
run: |
npm run lint:alone
- name: "Test"
shell: bash
run: |
npm run test:alone -- -- --coverage
- uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
flags: api
name: codecov-api
directory: ./api
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
flags: web
name: codecov-web
directory: ./web
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
flags: data
name: codecov-data
directory: ./data
fail_ci_if_error: false # put it back to true once we have tests in ./data
- uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
flags: models
name: codecov-models
directory: ./packages/models
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
flags: utils
name: codecov-utils
directory: ./packages/utils
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: "Misc"
shell: bash
run: |
npx lerna run bundle:alone --scope @dzcode.io/web
npx lerna run generate:sitemap --scope @dzcode.io/web
npx lerna run generate:htmls --scope @dzcode.io/web
env:
CI: true