diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..22e09c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: ci + +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - name: Setup bats + uses: mig4/setup-bats@v1 + with: + bats-version: 1.2.1 + + - name: Setup kcov + run: |- + sudo apt install libcurl4-openssl-dev libelf-dev libdw-dev cmake && + wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && + tar xzf master.tar.gz && + cd kcov-master && + mkdir build && + cd build && + cmake .. && + make && + sudo make install && + cd ../.. && + rm -rf kcov-master + + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Test with coverage + run: |- + mkdir -p coverage && + kcov coverage bats test && + bash <(curl -s https://codecov.io/bash) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 992b760..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: generic -sudo: required -addons: - apt: - packages: - - libcurl4-openssl-dev - - libelf-dev - - libdw-dev - - cmake -before_install: - - sudo add-apt-repository ppa:duggan/bats --yes - - sudo apt-get update -qq - - sudo apt-get install -qq bats -script: bats --tap test -after_success: | - wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && - tar xzf master.tar.gz && - cd kcov-master && - mkdir build && - cd build && - cmake .. && - make && - sudo make install && - cd ../.. && - rm -rf kcov-master && - mkdir -p coverage && - kcov coverage bats test && - bash <(curl -s https://codecov.io/bash) -notifications: - email: - on_success: never