From a9c3d79ceee33782b0753dd08a07022aad39a014 Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Tue, 22 Dec 2020 14:50:36 +0100 Subject: [PATCH 1/5] See whether we can run functional tests on GitHub --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..6155fb5b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + - push + - pull_request + +jobs: + # credo: + + # format: + + test: + name: Test Elixir ${{ matrix.elixir }}, OTP ${{ matrix.erlang }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - erlang: "23.0" + elixir: "1.10.3" + - erlang: "22.3" + elixir: "1.9.4" + - erlang: "21.3" + elixir: "1.8.2" + - erlang: "20.3.1" + elixir: "1.7.4" + - erlang: "19.3" + elixir: "1.6.6" + - erlang: "18.3" + elixir: "1.5.3" + + steps: + - uses: actions/checkout@v1 + + - name: Install OTP and Elixir + uses: actions/setup-elixir@v1 + with: + otp-version: ${{ matrix.erlang }} + elixir-version: ${{ matrix.elixir }} + + - name: Install dependencies + run: mix deps.get --only test + + - name: Run unit tests + run: mix test --trace --exclude functional + + - name: Run functional tests + run: mix test --trace --only functional From e6afc162f5de175a7c00a852c295e6df587b15d4 Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Tue, 22 Dec 2020 15:00:18 +0100 Subject: [PATCH 2/5] Run credo on GitHub actions --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6155fb5b..33c0192f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,44 @@ on: - pull_request jobs: - # credo: - # format: + # name: Format and compile with warnings as errors + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v1 + + # - name: Install OTP and Elixir + # uses: actions/setup-elixir@v1 + # with: + # otp-version: "23.0" + # elixir-version: "1.11.2" + + # - name: Install dependencies + # run: mix deps.get + + # - name: Check mix format + # run: mix format --check-formatted + + # - name: Compile with warnings as errors + # run: mix compile --warnings-as-errors + + analysis: + name: Run static code analysis + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Install OTP and Elixir + uses: actions/setup-elixir@v1 + with: + otp-version: "23.0" + elixir-version: "1.11.2" + + - name: Install dependencies + run: mix deps.get + + - name: Analyze code + run: mix credo --strict test: name: Test Elixir ${{ matrix.elixir }}, OTP ${{ matrix.erlang }} From 5e4163d4c74ebf1284d5e0c41a2d220f59308361 Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Tue, 22 Dec 2020 15:02:17 +0100 Subject: [PATCH 3/5] Extend build matrix with latest Elixir release --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33c0192f..5b74e0fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,6 +51,8 @@ jobs: fail-fast: false matrix: include: + - erlang: "23.0" + elixir: "1.11.2" - erlang: "23.0" elixir: "1.10.3" - erlang: "22.3" From 94454d8c0201a02519bc97176bf5c276eafbc066 Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Tue, 22 Dec 2020 15:09:09 +0100 Subject: [PATCH 4/5] Remove Travis CI config --- .travis.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9deac7f3..00000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: elixir - -# Compatibility between Elixir and Erlang/OTP -# https://hexdocs.pm/elixir/master/compatibility-and-deprecations.html -matrix: - include: - - elixir: 1.5 - otp_release: 18.1 - services: docker - - elixir: 1.5 - otp_release: 20.3 - services: docker - - elixir: 1.6 - otp_release: 19.0 - services: docker - - elixir: 1.6 - otp_release: 20.3 - services: docker - -before_script: - - chmod -R g-w test/fixtures # y u no work as expected travis? - -script: - - mix credo --strict - - mix test --exclude functional - - mix test --only functional - -after_script: - - mix inch.report From 12171ec6f8ca810638b7f000703a783b1d20663e Mon Sep 17 00:00:00 2001 From: pmeinhardt Date: Tue, 22 Dec 2020 15:19:26 +0100 Subject: [PATCH 5/5] Enable compilation check for CI --- .github/workflows/ci.yml | 46 +++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b74e0fd..28acd003 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,26 +5,32 @@ on: - pull_request jobs: - # format: - # name: Format and compile with warnings as errors - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v1 - - # - name: Install OTP and Elixir - # uses: actions/setup-elixir@v1 - # with: - # otp-version: "23.0" - # elixir-version: "1.11.2" - - # - name: Install dependencies - # run: mix deps.get - - # - name: Check mix format - # run: mix format --check-formatted - - # - name: Compile with warnings as errors - # run: mix compile --warnings-as-errors + format: + name: Format and compile with warnings as errors + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + + - name: Install OTP and Elixir + uses: actions/setup-elixir@v1 + with: + otp-version: "23.0" + elixir-version: "1.11.2" + + - name: Install dependencies + run: mix deps.get + + # TODO: Enable in next release + # + # At the moment, we still have pending PRs etc. + # and introducing auto-formatting now would cause + # a ton of conflicts. + # + # - name: Check mix format + # run: mix format --check-formatted + + - name: Compile with warnings as errors + run: mix compile --warnings-as-errors analysis: name: Run static code analysis