refactor: migrate to @std/expect #1005
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
merge_group: | |
branches: [master] | |
permissions: | |
contents: read | |
checks: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
deno: [v1.x, v2.x, canary] | |
name: Deno ${{ matrix.deno }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis. This is needed for better sonar | |
- name: Setup Deno ${{ matrix.deno }} | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: ${{ matrix.deno }} | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Format Check | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.deno == 'v2.x' }} | |
run: deno task format:check | |
- name: Lint | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.deno == 'v2.x' }} | |
run: deno task lint | |
- name: Tests with Coverage | |
run: deno task test:coverage | |
- name: Bundle | |
run: deno task bundle | |
- name: Coverage Report | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.deno == 'v2.x' }} | |
run: deno task coverage:report | |
- name: Fix Coverage Report Paths | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.deno == 'v2.x' }} | |
working-directory: ./coverage | |
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' lcov.info | |
- name: Check for SonarCloud Token Availability | |
id: sonar-token | |
shell: bash | |
run: | | |
if [ "${{ secrets.SONAR_TOKEN }}" != '' ]; then | |
echo "available=true" >> $GITHUB_OUTPUT; | |
else | |
echo "available=false" >> $GITHUB_OUTPUT; | |
fi | |
- name: SonarCloud Code Analysis | |
if: ${{ steps.sonar-token.outputs.available == 'true' && github.repository == 'poolifier/poolifier-web-worker' && matrix.os == 'ubuntu-latest' && matrix.deno == 'v2.x' }} | |
uses: sonarsource/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |