Skip to content

chore: bump version to 0.5.1 #49

chore: bump version to 0.5.1

chore: bump version to 0.5.1 #49

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
build:
name: Build & Format Check
runs-on: ubuntu-latest
outputs:
otp-version: ${{ steps.setup-env.outputs.otp-version }}
elixir-version: ${{ steps.setup-env.outputs.elixir-version }}
steps:
- uses: actions/checkout@v4
- id: setup-env
uses: ./.github/actions/setup-elixir-rust
- name: Check Elixir formatting
run: mix format --check-formatted
- name: Check Rust formatting
run: cd native/dprint_markdown_formatter && cargo fmt --check
- name: Compile with warnings as errors
run: mix compile --warnings-as-errors
- name: Run Rust clippy
run: cd native/dprint_markdown_formatter && cargo clippy -- -D warnings
test:
name: Run Tests
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-elixir-rust
- name: Run tests
run: mix test
quality:
name: Quality Checks
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
check: [credo, dialyzer]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-elixir-rust
with:
cache-key-suffix: -${{ matrix.check }}
- name: Cache Dialyzer PLTs
if: matrix.check == 'dialyzer'
uses: actions/cache@v4
with:
path: priv/plts
key: ${{ runner.os }}-plt-${{ needs.build.outputs.otp-version }}-${{ needs.build.outputs.elixir-version }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-plt-${{ needs.build.outputs.otp-version }}-${{ needs.build.outputs.elixir-version }}
- name: Run Credo
if: matrix.check == 'credo'
run: mix credo --strict
- name: Run Dialyzer
if: matrix.check == 'dialyzer'
run: mix dialyzer --format github
matrix-test:
name: Test Matrix (Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: "1.18.3"
otp: "27.2"
warnings_as_errors: true
- elixir: "1.17.3"
otp: "27.2"
- elixir: "1.17.3"
otp: "26.2"
- elixir: "1.16.3"
otp: "26.2"
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-elixir-rust
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
cache-key-suffix: -${{ matrix.otp }}-${{ matrix.elixir }}
- name: Compile
run: mix compile
- name: Compile with warnings as errors
if: ${{ matrix.warnings_as_errors == true }}
run: mix compile --warnings-as-errors --force
- name: Run tests
run: mix test