diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 00000000..d278dcb1 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,40 @@ +# Github action to test localrest +# +# Also upload the documentation to Github pages +# +name: CI + +on: [push, pull_request] + +jobs: + main: + name: Run + # Matrix configuration + strategy: + fail-fast: false + matrix: + os: [ ubuntu-18.04, macOS-10.15, windows-2019 ] + dc: [ ldc-master, dmd-master, ldc-latest, dmd-latest, ldc-1.17.0, dmd-2.088.1 ] + + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + + # The actual work being performed + steps: + - uses: actions/checkout@v2 + + - name: Prepare compiler + uses: dlang-community/setup-dlang@v1 + with: + compiler: ${{ matrix.dc }} + + - name: Test + shell: bash + run: dub test -b unittest-cov --compiler=${DC} + + - uses: codecov/codecov-action@v1 + with: + name: localrest-${{ matrix.os }}-${{ matrix.dc }} + flags: unittest + # false until we can re-trigger a single test in Github + fail_ci_if_error: false diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 75f32cc9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ -language: d - -# Trusty is Travis' default but reached EOL 2019-04-30 -dist: xenial - -branches: - only: - - /^v\d+\.(x|[\d]+)\.(x|[\d]+)([-|\+](\S+))?$/ - -os: - - linux - - osx - -d: - - dmd - - ldc - - dmd-2.085.1 - - ldc-1.14.0 - -# Latest version of DMD/GDC/LDC -matrix: - include: - - os: linux - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gdc-9 - env: DC=gdc - -# TODO: Make `vibe-d:data` optional, and fetch it here for testing -# Currently dub complains even after running `dub fetch vibe-d:data`. -script: - - dub test -b unittest-cov --compiler=${DC} -after_success: - - bash <(curl -s https://codecov.io/bash) -cF unittests