Fix and improve the CI configuration #152
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: | |
- 'v*.*.x' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'v*.*.x' | |
# Do a periodic build (every Monday at 0600) to ensure integrity | |
schedule: | |
- cron: '0 6 * * 1' | |
jobs: | |
build: | |
name: Run | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: macos-latest, dc: ldc-latest } | |
- { os: ubuntu-latest, dc: dmd-latest } | |
- { os: ubuntu-latest, dc: ldc-latest } | |
- { os: windows-latest, dc: dmd-latest } | |
- { os: windows-latest, dc: ldc-latest } | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Requiried for codecov action | |
fetch-depth: 2 | |
- uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: ${{ matrix.dc }} | |
- name: 'Build & Test' | |
shell: bash | |
run: | | |
dub test -b unittest-cov | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
flags: unittests |