diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cecd403 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,52 @@ +name: Test + +on: + pull_request: + branches: + - "main" + push: + +jobs: + build: + name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + otp_version: + - "25.x" + - "24.x" + - "23.x" + - "22.x" + - "21.x" + - "20.x" + include: + - otp_version: "22.x" + rebar3-version: 3.6.1 + - otp_version: "21.x" + rebar3-version: 3.6.1 + - otp_version: "20.x" + rebar3-version: 3.6.1 + env: + OTP_VERSION: ${{ matrix.otp_version }} + steps: + - uses: actions/checkout@v3 + - uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp_version }} + rebar3-version: ${{ matrix.rebar3-version }} + - uses: actions/cache@v2 + name: Cache + with: + path: | + _build + key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-1 + restore-keys: | + ${{ runner.os }}-build-${{ matrix.otp_version }}-1- + - name: Compile + run: rebar3 compile + - name: Eunit tests + run: rebar3 eunit + - name: Dialyzer + run: rebar3 dialyzer || exit 0 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3993bf2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: erlang -otp_release: - - R16B - - R16B03-1 - - 17.0 - - 17.1 - - 18.0 - - 18.1 - - 18.2.1 - - 19.3 - - 20.0 -before_script: - - "./bootstrap_travis.sh" -script: "./rebar3 eunit" diff --git a/bootstrap_travis.sh b/bootstrap_travis.sh deleted file mode 100755 index a222df3..0000000 --- a/bootstrap_travis.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -curl -O -L https://s3.amazonaws.com/rebar3/rebar3 -chmod +x rebar3 -./rebar3 update \ No newline at end of file