fix: use next as default bundle on push #2238
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 & Lint | |
on: | |
push: | |
branches-ignore: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
services: | |
postgres: | |
image: postgres:11 | |
env: | |
POSTGRES_USER: core | |
POSTGRES_PASSWORD: supersecret | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
env: | |
MIX_ENV: test | |
POSTGRES_USER: core | |
POSTGRES_PASS: supersecret | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: setup-elixir | |
uses: erlef/setup-elixir@v1 | |
with: | |
otp-version: "25.3.2.7" | |
elixir-version: "1.14.0" | |
- name: Setup the Elixir project | |
run: make deps | |
# Setup caching (mostly for Dialyzer) | |
- uses: actions/cache@v4 | |
id: cache | |
with: | |
path: core/priv/plts | |
key: "mix-${{ runner.os }}-${{ steps.setup-elixir.outputs.otp-version }}-Elixir-${{ steps.setup-elixir.outputs.elixir-version }}" | |
- name: Format | |
run: make format | |
continue-on-error: true | |
- name: Commit formatted code | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "." | |
message: "Formatted code" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Dialyzer | |
run: make dialyzer | |
- name: Compile | |
run: make compile | |
- name: Test | |
run: make test | |
- name: Credo | |
run: make credo | |
- name: Format | |
run: make format |