.github/workflows/test.yml
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- name: Setup repo
uses: actions/checkout@v2
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run test
run: deno test --allow-run --coverage=coverage
- name: Create lcov format coverage
if: matrix.os != 'windows-latest'
run: deno coverage ./coverage --lcov > coverage.lcov
- name: Upload coverage
if: matrix.os != 'windows-latest'
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: cat coverage.lcov
coverageLocations: |
${{github.workspace}}/coverage.lcov:lcov