diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command deleted file mode 100755 index f1b5d57..0000000 --- a/.buildkite/hooks/pre-command +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -e -echo '--- :house_with_garden: Setting up the environment' - -. "$HOME/.asdf/asdf.sh" -asdf local erlang 21.3 -asdf local python 3.7.3 -asdf local ruby 2.6.2 - diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index 2d42d62..0000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,6 +0,0 @@ -steps: - - commands: - - "make ci" - name: ":hammer: build" - agents: - queue: "erlang" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..13b63c7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + CI: + runs-on: ubuntu-18.04 + container: heliumsystems/builder-erlang:2 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Cancel previous runs + if: ${{ !env.ACT }} + uses: styfle/cancel-workflow-action@0.5.0 + with: + access_token: ${{ github.token }} + + - name: Cache Hex Packages + if: ${{ !env.ACT }} + uses: actions/cache@v1 + with: + path: ~/.cache/rebar3/hex/hexpm/packages + key: ${{ runner.os }}-hex-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.lock')) }} + restore-keys: | + ${{ runner.os }}-hex- + + - name: Cache Dialyzer PLTs + if: ${{ !env.ACT }} + uses: actions/cache@v1 + with: + path: ~/.cache/rebar3/rebar3_*_plt + key: ${{ runner.os }}-dialyzer-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }} + restore-keys: | + ${{ runner.os }}-dialyzer- + + - name: Build + run: rebar3 compile + + - name: Run Dialyzer + run: rebar3 do dialyzer, xref