|
5 | 5 | push: |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - check_commit_message: |
9 | | - name: skips CI and prints cli message, without fail build badge |
10 | | - runs-on: ubuntu-latest |
11 | | - if: "contains(github.event.head_commit.message, '[skip ci]')" |
12 | | - steps: |
13 | | - - run: echo "no need to build, based from commit message" |
14 | | - |
| 8 | + # https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs |
| 9 | + # Workflows that would otherwise be triggered using `on: push` or |
| 10 | + # `on: pull_request` won't be triggered if you add any of the |
| 11 | + # following strings to the commit message in a push, or the HEAD |
| 12 | + # commit of a pull request: |
| 13 | + # - [skip ci] |
| 14 | + # - [ci skip] |
| 15 | + # - [no ci] |
| 16 | + # - [skip actions] |
| 17 | + # - [actions skip] |
15 | 18 | test: |
16 | | - name: Elixir v${{ matrix.elixir }}/OTP v${{ matrix.otp }} |
17 | | - runs-on: ubuntu-latest |
18 | | - strategy: |
19 | | - matrix: |
20 | | - include: |
21 | | - # - elixir: 1.11.x |
22 | | - # otp: 22 |
23 | | - # - elixir: 1.11.x |
24 | | - # otp: 23 |
25 | | - # - elixir: 1.12.x |
26 | | - # otp: 23 |
27 | | - # - elixir: 1.13.x |
28 | | - # otp: 24 |
29 | | - - elixir: 1.14.x |
30 | | - otp: 25 |
31 | | - warnings_as_errors: true |
32 | | - static_analysis: true |
| 19 | + name: Elixir setup and test |
| 20 | + runs-on: ubuntu-20.04 |
33 | 21 | env: |
34 | 22 | MIX_ENV: test |
35 | 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
36 | | - |
37 | | - # doesn't contain "ci skip" in commit message |
38 | | - if: "!contains(github.event.head_commit.message, '[skip ci]')" |
39 | 24 | steps: |
40 | 25 | - name: Checkout repo |
41 | | - uses: actions/checkout@v2 |
| 26 | + uses: actions/checkout@v4 |
42 | 27 |
|
43 | 28 | - name: Setup Erlang/OTP & Elixir |
44 | 29 | uses: erlef/setup-beam@v1 |
45 | 30 | with: |
46 | | - otp-version: ${{ matrix.otp }} |
47 | | - elixir-version: ${{ matrix.elixir }} |
| 31 | + otp-version: "26" |
| 32 | + elixir-version: "1.16.x" |
48 | 33 |
|
49 | 34 | - name: Cache artifacts |
50 | | - uses: actions/cache@v2 |
| 35 | + uses: actions/cache@v4 |
51 | 36 | with: |
52 | 37 | path: | |
53 | 38 | deps |
54 | 39 | _build |
55 | | - key: ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix-${{ hashFiles('**/mix.lock') }} |
| 40 | + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} |
56 | 41 | restore-keys: | |
57 | | - ${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-mix- |
| 42 | + ${{ runner.os }}-mix- |
58 | 43 |
|
59 | 44 | - name: Install Dependencies |
60 | 45 | run: | |
|
73 | 58 | run: mix coveralls.github |
74 | 59 | env: |
75 | 60 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
76 | | - |
77 | | - - name: Publish to Hex |
78 | | - if: "contains(github.event.head_commit.message, '[publish to hex]')" |
79 | | - run: | |
80 | | - mix hex.config api_key ${{ secrets.HEX_API_KEY }} |
81 | | - mix hex.publish --yes |
0 commit comments