From 265837e29bf797f005baa28fbcf92aa88a3ecae1 Mon Sep 17 00:00:00 2001 From: jaeyson Date: Fri, 12 Apr 2024 17:52:57 +0800 Subject: [PATCH] update ci.yml --- .github/workflows/ci.yml | 51 +++++++++++++--------------------------- 1 file changed, 16 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 254de24..ec3418e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,41 +5,22 @@ on: push: jobs: - check_commit_message: - name: skips CI and prints cli message, without fail build badge - runs-on: ubuntu-latest - if: "contains(github.event.head_commit.message, '[skip ci]')" - steps: - - run: echo "no need to build, based from commit message" - + # https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs + # Workflows that would otherwise be triggered using `on: push` or + # `on: pull_request` won't be triggered if you add any of the + # following strings to the commit message in a push, or the HEAD + # commit of a pull request: + # - [skip ci] + # - [ci skip] + # - [no ci] + # - [skip actions] + # - [actions skip] test: - name: Elixir v${{ matrix.elixir }}/OTP v${{ matrix.otp }} - runs-on: ubuntu-latest - strategy: - matrix: - include: - - elixir: 1.11.x - otp: 22 - - elixir: 1.11.x - otp: 23 - - elixir: 1.12.x - otp: 23 - - elixir: 1.13.x - otp: 24 - - elixir: 1.14.x - otp: 25 - - elixir: 1.15.x - otp: 26 - - elixir: 1.16.x - otp: 26 - warnings_as_errors: true - static_analysis: true + name: Elixir setup and test + runs-on: ubuntu-20.04 env: MIX_ENV: test GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # doesn't contain "ci skip" in commit message - if: "!contains(github.event.head_commit.message, '[skip ci]')" steps: - name: Checkout repo uses: actions/checkout@v4 @@ -47,8 +28,8 @@ jobs: - name: Setup Erlang/OTP & Elixir uses: erlef/setup-beam@v1 with: - otp-version: ${{ matrix.otp }} - elixir-version: ${{ matrix.elixir }} + otp-version: "22" + elixir-version: "1.9.0" - name: Cache artifacts uses: actions/cache@v4 @@ -56,9 +37,9 @@ jobs: path: | deps _build - key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ hashFiles('**/mix.lock') }} + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} restore-keys: | - ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix- + ${{ runner.os }}-mix- - name: Install Dependencies run: |