initial working version of stacks #600
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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- core/** | |
pull_request: | |
branches: | |
- main | |
paths: | |
- core/** | |
env: | |
MIX_ENV: test | |
permissions: | |
contents: read | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: canary_test | |
options: >- | |
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
sparse-checkout: core | |
- uses: arduino/setup-task@v2 | |
- uses: erlef/setup-beam@v1 | |
with: | |
version-file: core/.tool-versions | |
version-type: strict | |
- uses: actions/cache@v3 | |
id: cache-deps | |
env: | |
cache-name: cache-elixir-deps | |
with: | |
path: core/deps | |
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ env.cache-name }}- | |
- uses: actions/cache@v3 | |
id: cache-build | |
env: | |
cache-name: cache-compiled-build | |
with: | |
path: core/_build | |
key: ${{ runner.os }}-mix-${{ env.cache-name }}-${{ hashFiles('**/mix.lock') }} | |
restore-keys: | | |
${{ runner.os }}-mix-${{ env.cache-name }}- | |
${{ runner.os }}-mix- | |
- if: github.run_attempt != '1' | |
run: | | |
mix deps.clean --all | |
mix clean | |
shell: sh | |
- run: mix deps.get | |
working-directory: core | |
- run: mix compile --warnings-as-errors | |
working-directory: core | |
- run: mix format --check-formatted | |
working-directory: core | |
- run: mix test | |
working-directory: core |