diff --git a/.github/actions/c#/action.yml b/.github/actions/c#/action.yml new file mode 100644 index 00000000..51621404 --- /dev/null +++ b/.github/actions/c#/action.yml @@ -0,0 +1,19 @@ +name: c#/init +description: c#/init +runs: + using: composite + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: 7 + cache: true + cache-dependency-path: ${{ github.workspace }}/c#/*/packages.lock.json + - run: dotnet new globaljson --sdk-version 7.0.405 + working-directory: c# + shell: bash + - run: dotnet restore + working-directory: c# + shell: bash diff --git a/.github/actions/fe/action.yml b/.github/actions/fe/action.yml new file mode 100644 index 00000000..bdeb6260 --- /dev/null +++ b/.github/actions/fe/action.yml @@ -0,0 +1,15 @@ +name: fe/init +description: fe/init +runs: + using: composite + 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 + working-directory: fe + shell: bash 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..84fccdd7 --- /dev/null +++ b/.github/workflows/c#.yml @@ -0,0 +1,18 @@ +name: c# +on: + push: + paths: [c#/**] +defaults: + run: + working-directory: c# +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + project: [crawler, imagePipeline, shared, tbClient] + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/c# + - name: build + run: dotnet build --no-restore -c Debug ${{ matrix.project }} diff --git a/.github/workflows/fe.yml b/.github/workflows/fe.yml new file mode 100644 index 00000000..33273113 --- /dev/null +++ b/.github/workflows/fe.yml @@ -0,0 +1,30 @@ +name: fe +on: + push: + paths: [fe/**] +defaults: + run: + working-directory: fe +jobs: + tsc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/fe + - run: yarn run vue-tsc + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/fe + - run: yarn run eslint src + codechecks: + runs-on: ubuntu-latest + steps: # contains CVE that triggers Dependabot + - uses: actions/checkout@v4 + - uses: ./.github/actions/fe + - run: | + yarn add -D typecov @codechecks/client + yarn run codechecks ../.github/codechecks.yml + env: + CC_SECRET: ${{ secrets.CC_SECRET }}