Add test for alpine 3.20.2 with chrome 128 #300
This file contains 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: Test | |
on: [pull_request] | |
jobs: | |
test: | |
name: ${{ matrix.tag }} | |
strategy: | |
matrix: | |
tag: ['elixir-1-11', 'debian-buster', 'alpine-3-17-3', 'alpine-3-18-4', 'alpine-3-20-2'] | |
env: | |
MIX_ENV: test | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/bitcrowd/chromic_pdf:${{ matrix.tag }} | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: --privileged --user 1001 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies cache | |
id: deps-cache | |
uses: actions/cache@v3 | |
with: | |
path: deps | |
key: ${{ runner.os }}-${{ matrix.tag }}-deps-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- name: Build artifacts cache | |
id: build-cache | |
uses: actions/cache@v3 | |
with: | |
path: _build | |
key: ${{ runner.os }}-${{ matrix.tag }}-build-v1-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }} | |
- run: mix local.hex --force && mix local.rebar | |
- run: mix deps.get | |
- run: mix compile | |
- run: mix chromic_pdf.warm_up | |
# only retry failed tests if the tests ran and actually failed (exit status 2), and don't retry if e.g. they didn't compile | |
- run: mix test || if [[ $? = 2 ]]; then mix test --failed || if [[ $? = 2 ]]; then mix test --failed; else false; fi; else false; fi |