Skip to content

Commit

Permalink
ci: update ci script to update coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Sep 14, 2024
1 parent 1098fe7 commit c92dacb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 14 deletions.
53 changes: 41 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,42 @@ jobs:
test-integration:
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [20.12.2]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install --immutable --network-timeout 500000
- name: Run build
run: yarn tsc --build
env:
FORCE_COLOR: true
- name: Run test
run: yarn test:integration
env:
FORCE_COLOR: true
- name: Upload vitest config files
uses: actions/upload-artifact@v4
with:
name: vitest-config-integration-${{ matrix.os }}-${{ matrix.version }}
overwrite: true
path: |
team.json
packages/platform/platform-express/vitest.config.mts
packages/platform/platform-koa/vitest.config.mts
continue-on-error: true

test-envs:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand Down Expand Up @@ -67,16 +103,7 @@ jobs:
run: yarn test:integration
env:
FORCE_COLOR: true
- name: Upload vitest config files
uses: actions/upload-artifact@v4
with:
name: vitest-config-integration-${{ matrix.os }}-${{ matrix.version }}
overwrite: true
path: |
team.json
packages/platform/platform-express/vitest.config.mts
packages/platform/platform-koa/vitest.config.mts
continue-on-error: true

test-core:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -283,7 +310,8 @@ jobs:
test-download-artifacts:
runs-on: ubuntu-latest
needs: [lint, test-core, test-specs, test-platform, test-integration, test-orm, test-security, test-graphql, test-third-parties]
needs:
[lint, test-core, test-specs, test-platform, test-integration, test-envs, test-orm, test-security, test-graphql, test-third-parties]
if: github.event_name == 'pull_request'
strategy:
matrix:
Expand All @@ -307,7 +335,8 @@ jobs:

deploy-packages:
runs-on: ubuntu-latest
needs: [lint, test-core, test-specs, test-platform, test-integration, test-orm, test-security, test-graphql, test-third-parties]
needs:
[lint, test-core, test-specs, test-platform, test-integration, test-envs, test-orm, test-security, test-graphql, test-third-parties]
if: github.event_name != 'pull_request' && contains('
refs/heads/production
refs/heads/alpha
Expand Down
4 changes: 2 additions & 2 deletions packages/platform/platform-koa/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export default defineConfig(
...presets.test.coverage,
thresholds: {
statements: 99.15,
branches: 95.65,
branches: 95.6,
functions: 100,
lines: 99.15
}
}
}
}
);
);

0 comments on commit c92dacb

Please sign in to comment.