From 2fde9ecb6f24bca9984d49694ac11f5826a6ebec Mon Sep 17 00:00:00 2001 From: j3lte Date: Thu, 13 Apr 2023 02:29:01 +0200 Subject: [PATCH] Update runner --- .github/workflows/main.yml | 68 +++++++++++++++++++++++--------------- deno.json | 6 ++-- 2 files changed, 46 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d87cb98..b7c5ee9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,31 +1,47 @@ name: Deno CI on: - push: - branches: [main] - pull_request: - branches: [main] + push: + branches: [main] + pull_request: + branches: [main] jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup Deno - uses: denoland/setup-deno@v1 - - name: Lint - run: deno lint - - name: Tests - run: deno task test - - name: Coverage - run: deno task coverage - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./.coverage/coverage.lcov - flags: unittests - name: codecov-umbrella - fail_ci_if_error: true + test: + name: tests (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + fail-fast: true + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Deno + uses: denoland/setup-deno@v1 + + - name: Check format + if: matrix.os == 'ubuntu-latest' + run: deno fmt --check + + - name: Check linting + if: matrix.os == 'ubuntu-latest' + run: deno lint + + - name: Tests + run: deno task test + + - name: Coverage + if: matrix.os == 'ubuntu-latest' + run: deno task coverage + + - name: Upload coverage reports to Codecov + if: matrix.os == 'ubuntu-latest' + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./.coverage/coverage.lcov + flags: unittests + name: codecov-umbrella + fail_ci_if_error: true diff --git a/deno.json b/deno.json index 2087820..1f9f760 100644 --- a/deno.json +++ b/deno.json @@ -32,7 +32,8 @@ "files": { "exclude": [ "./_local_testing.ts", - "./.coverage/**/*" + "./.coverage/**/*", + "./github/**/*" ] } }, @@ -41,7 +42,8 @@ "exclude": [ "./_local_testing.ts", "./.coverage/**/*", - "./test/**/*" + "./test/**/*", + "./github/**/*" ] } }