Skip to content

Split jobs

Split jobs #55

name: Buld and test
on:
push:
branches: [master, development]
jobs:
checkoutAndInstallDeno:
name: Checkout and install deno
runs-on: ubuntu-latest
permissions:
contents: read # Needed to clone the repository
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v2.x
- name: Run tests with coverage
run: "deno task test:coverage"
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: checkoutAndInstallDeno
steps:
- name: Generate coverage
run: "deno task coverage:lcov"
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest
needs: checkoutAndInstallDeno
steps:
- name: Lint step
run: "deno lint"
- name: Check step
run: "deno task check"
- name: Test step
run: "deno task test"