Skip to content

fix: script

fix: script #99

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Setup Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: nrwl/nx-set-shas@v3
- name: Install Dependencies
run: npm ci
- name: Lint
run: npx nx affected:lint --parallel=3
- name: Build
run: npx nx affected:build --parallel=3
- name: Test
run: npx nx affected:test --parallel=3 --ci --code-coverage
- name: Upload unit tests coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/apps/yggdrasil-core-engine/lcov.info,./coverage/apps/yggdrasil-discord-client/lcov.info,./coverage/libs/nest-openai-client/lcov.info,./coverage/libs/nest-winston/lcov.info,./coverage/libs/utils/lcov.info
push_to_gitlab:
# if branch is develop, push to gitlab develop branch
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
needs: main
steps:
- name: Push to GitLab
uses: actions/checkout@v3
- name: Push to GitLab
run: |
git fetch --unshallow
git push https://yasuoyuhao:${{secrets.GITLAB_TOKEN}}@gitlab.com/welfree-studio/asgard-hub.git develop -f