Skip to content

Trim Hex description to 300-char limit, bump Cargo to v0.2.0 #15

Trim Hex description to 300-char limit, bump Cargo to v0.2.0

Trim Hex description to 300-char limit, bump Cargo to v0.2.0 #15

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
FORCE_RUSTYXML_BUILD: true
CARGO_INCREMENTAL: 0
permissions:
contents: read
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: 1.16
otp: 25
- pair:
elixir: 1.17
otp: 26
- pair:
elixir: 1.18
otp: 27
steps:
- uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{matrix.pair.elixir}}
otp-version: ${{matrix.pair.otp}}
- name: Restore Elixir dependencies cache
uses: actions/cache@v4
with:
path: deps
key: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-${{matrix.pair.elixir}}-${{matrix.pair.otp}}-
- name: Restore Cargo cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies
run: mix deps.get
- name: Check formatting
run: mix format --check-formatted && cargo fmt --check --manifest-path native/rustyxml/Cargo.toml
- name: Clippy
run: cargo clippy --manifest-path native/rustyxml/Cargo.toml -- -D warnings
- name: Cargo test
run: cargo test --manifest-path native/rustyxml/Cargo.toml
- name: Credo
run: mix credo --strict
- name: Run tests
run: mix test