Skip to content

fix: variable replacement #600

fix: variable replacement

fix: variable replacement #600

Workflow file for this run

---
name: Continuous Integration
# Add environment variables section
env:
OTP_VERSION: "27.0"
ELIXIR_VERSION: "1.17"
CACHE_VERSION: "v1"
on:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- main
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ github.repository }}
tags: |
type=sha
type=ref,event=branch
type=ref,event=tag
- uses: docker/build-push-action@v5
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Credo:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: beam
uses: erlef/[email protected]
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- id: cache
uses: actions/cache@v3
with:
key: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-credo-${{ hashFiles('mix.lock') }}-${{ github.ref }}
restore-keys: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-credo-${{ hashFiles('mix.lock') }}-${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-credo-
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-
path: |
_build
deps
- if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get
- run: mix credo
Dialyzer:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: beam
uses: erlef/[email protected]
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- id: cache
uses: actions/cache@v3
with:
key: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-dialyzer-${{ hashFiles('mix.lock') }}-${{ github.ref }}
restore-keys: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-dialyzer-${{ hashFiles('mix.lock') }}-${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-dialyzer-
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-
path: |
_build
deps
- if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get
- run: mix dialyzer
Format:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: beam
uses: erlef/[email protected]
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- id: cache
uses: actions/cache@v3
with:
key: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-format-${{ hashFiles('mix.lock') }}-${{ github.ref }}
restore-keys: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-format-${{ hashFiles('mix.lock') }}-${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-format-
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-
path: |
_build
deps
- if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get
- run: mix format --check-formatted
Test:
needs: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: beam
uses: erlef/[email protected]
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}
- id: cache
uses: actions/cache@v3
with:
key: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-test-${{ hashFiles('mix.lock') }}-${{ github.ref }}
restore-keys: |
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-test-${{ hashFiles('mix.lock') }}-${{ format('refs/heads/{0}', github.event.repository.default_branch) }}
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-test-
${{ env.CACHE_VERSION }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-
path: |
_build
deps
- if: steps.cache.outputs.cache-hit != 'true'
run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix test