From b10610aa7f906d1284f2ee7fea10a485d00eec8b Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 12 Jun 2021 15:32:49 +0300 Subject: [PATCH] Remove travis-ci related files. Add github workflow --- .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 12 ------------ README.md | 2 +- travis-script.sh | 13 ------------- 4 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100755 travis-script.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..df25899 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: build +on: + pull_request: + push: + release: + types: [published] + +jobs: + Build: + if: "!contains(github.event.head_commit.message, '[skip ci]')" + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + dc: + - ldc-latest + - dmd-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup D + uses: dlang-community/setup-dlang@v1 + with: + compiler: ${{ matrix.dc }} + + - name: Build and run tests + run: | + dub test -b unittest-cov + + - name: Install and run doveralls + if: ${{ startsWith(matrix.os, 'ubuntu') && startsWith(matrix.dc, 'dmd') && github.event_name == 'push' }} + run: | + sudo apt-get install -y libcurl4-openssl-dev + dub fetch doveralls + dub run doveralls -- -t ${{ secrets.CoverallsToken }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 43b8fe4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: d -matrix: - allow_failures: - - d: ldc - include: - - d: dmd - env: USE_DOVERALLS=true - - d: ldc - -script: - - chmod +x travis-script.sh - - ./travis-script.sh diff --git a/README.md b/README.md index 6aa7a64..d1525c6 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ D library for working with *.desktop* files. Desktop entries in Freedesktop world are akin to shortcuts from Windows world (.lnk files). -[![Build Status](https://travis-ci.org/FreeSlave/desktopfile.svg?branch=master)](https://travis-ci.org/FreeSlave/desktopfile) [![Coverage Status](https://coveralls.io/repos/FreeSlave/desktopfile/badge.svg?branch=master&service=github)](https://coveralls.io/github/FreeSlave/desktopfile?branch=master) +[![Build Status](https://github.com/FreeSlave/desktopfile/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/FreeSlave/desktopfile/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/FreeSlave/desktopfile/badge.svg?branch=master&service=github)](https://coveralls.io/github/FreeSlave/desktopfile?branch=master) [Online documentation](https://freeslave.github.io/d-freedesktop/docs/desktopfile.html) diff --git a/travis-script.sh b/travis-script.sh deleted file mode 100755 index f3d2356..0000000 --- a/travis-script.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -ex - -if [ "$USE_DOVERALLS" = "true" ]; then - wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.3.2/doveralls_linux_travis" - chmod +x doveralls - dub test -b unittest-cov --compiler=${DC} - rm ..-* - ./doveralls -else - dub test --compiler=${DC} -fi