Upgrade deps, plugins and ci (#61) #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: main | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - "*" | |
| workflow_dispatch: {} | |
| jobs: | |
| test: | |
| name: Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }} | |
| strategy: | |
| matrix: | |
| otp: ['28', '27', '26'] | |
| elixir: ['1.19', '1.18', '1.17', '1.16'] | |
| exclude: | |
| # Unsupported | |
| - elixir: '1.17' | |
| otp: '28' | |
| - elixir: '1.16' | |
| otp: '27' | |
| - elixir: '1.16' | |
| otp: '28' | |
| runs-on: 'ubuntu-latest' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: ${{ matrix.otp }} | |
| elixir-version: ${{ matrix.elixir }} | |
| - uses: actions/cache@v5 | |
| id: cache | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: v1-${{runner.os}}-${{matrix.elixir}}-${{matrix.otp}}-${{hashFiles('**/mix.lock')}} | |
| - run: mix deps.get | |
| - run: mix deps.unlock --check-unused | |
| - run: mix hex.audit | |
| - run: mix compile --warnings-as-errors | |
| - run: mix format --check-formatted | |
| if: ${{ (matrix.otp == '28') && (matrix.elixir >= '1.19' ) }} | |
| - run: mix credo --strict --all | |
| if: ${{ (matrix.otp == '28') && (matrix.elixir == '1.18' ) }} | |
| - run: mix dialyzer | |
| if: ${{ (matrix.otp == '28') && (matrix.elixir == '1.18' ) }} | |
| - run: mix docs | |
| if: ${{ (matrix.otp == '28') && (matrix.elixir == '1.18' ) }} | |
| - run: MIX_ENV=test mix coveralls.json | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| if: ${{ (matrix.otp == '28') && (matrix.elixir == '1.18' ) }} | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: prometheus-erl/prometheus.ex | |
| fail_ci_if_error: true | |
| verbose: true |