From 9ed9404ae90e62889b2b2d1ca8fc2a96d769e034 Mon Sep 17 00:00:00 2001 From: n0099 Date: Mon, 12 Feb 2024 09:29:01 +0800 Subject: [PATCH] + workflows/{fe,c#}.yml + codechecks.yml @ .github --- .github/codechecks.yml | 8 ++++++++ .github/workflows/c#.yml | 24 ++++++++++++++++++++++++ .github/workflows/fe.yml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 .github/codechecks.yml create mode 100644 .github/workflows/c#.yml create mode 100644 .github/workflows/fe.yml diff --git a/.github/codechecks.yml b/.github/codechecks.yml new file mode 100644 index 00000000..5f7b4eed --- /dev/null +++ b/.github/codechecks.yml @@ -0,0 +1,8 @@ +settings: + # https://github.com/codechecks/monorepo/blob/4ccc8bbaab1586c0ef265f234f0a275fd40b38f8/packages/client/src/speculativeBranchSelection.ts#L73 + branches: ['v2'] +checks: + - name: typecov + options: + strict: true + atLeast: 95 diff --git a/.github/workflows/c#.yml b/.github/workflows/c#.yml new file mode 100644 index 00000000..5eaf9974 --- /dev/null +++ b/.github/workflows/c#.yml @@ -0,0 +1,24 @@ +name: c# +on: + push: + #paths: ['c#/**'] +defaults: + run: + working-directory: ./c# +jobs: + cs: + name: c# + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 7 + cache: true + cache-dependency-path: ${{github.workspace}}/c#/*/packages.lock.json + - name: global.json + run: dotnet new globaljson --sdk-version 7.0.405 + - name: restore + run: dotnet restore + - name: build + run: dotnet build --configuration Debug diff --git a/.github/workflows/fe.yml b/.github/workflows/fe.yml new file mode 100644 index 00000000..fa511c7e --- /dev/null +++ b/.github/workflows/fe.yml @@ -0,0 +1,33 @@ +name: fe +on: + push: + #paths: ['fe/**'] +defaults: + run: + working-directory: ./fe +jobs: + fe: + name: fe + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: yarn + cache-dependency-path: ${ GITHUB_WORKSPACE }/fe/yarn.lock + - name: install + run: yarn install --immutable + - name: tsc + run: yarn run vue-tsc + - name: eslint + if: ${{ !cancelled() }} + run: yarn run eslint src + - name: codechecks + if: ${{ !cancelled() }} + # contains CVE that triggers Dependabot + run: | + yarn add -D typecov @codechecks/client + yarn run codechecks ../.github/codechecks.yml + env: + CC_SECRET: ${{ secrets.CC_SECRET }}