Skip to content

update ci

update ci #120

Workflow file for this run

name: cover
on:
workflow_dispatch:
push:
branches:
- main
pull_request_target:
branches:
- main
jobs:
cover:
name: test and cover
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Cache library
uses: actions/cache@v2
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Run tests and generate coverage report
uses: game-ci/unity-test-runner@v2
id: tests
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
testMode: editmode
coverageOptions: useProjectSettings;generateAdditionalMetrics
customParameters: -debugCodeOptimization -enableCodeCoverage
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: ${{ steps.tests.outputs.coveragePath }}/**/*.xml
fail_ci_if_error: true