mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00
expose test information
This commit is contained in:
34
.github/workflows/test.yml
vendored
34
.github/workflows/test.yml
vendored
@@ -1,17 +1,21 @@
|
||||
name: Tests
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
statuses: write
|
||||
checks: write
|
||||
contents: read
|
||||
actions: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
branches: [main, ci]
|
||||
types: [opened, reopened, synchronize]
|
||||
merge_group: # triggers workflow for merge queue
|
||||
merge_group:
|
||||
types: [checks_requested]
|
||||
|
||||
jobs:
|
||||
@@ -29,4 +33,28 @@ jobs:
|
||||
run: bun install
|
||||
|
||||
- name: Test
|
||||
run: bun run test
|
||||
run: bun run test:coverage
|
||||
|
||||
# Upload coverage as Pages artifact only on push to main
|
||||
- name: Upload coverage html
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: ./coverage
|
||||
name: "coverage"
|
||||
|
||||
|
||||
deploy_coverage:
|
||||
if: github.event_name == 'pull_request'
|
||||
needs: tests
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: coverage-ui
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
steps:
|
||||
- name: Deploy coverage-ui
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
with:
|
||||
artifact_name: 'coverage'
|
||||
|
Reference in New Issue
Block a user