Refactor XPath evaluation and optimize memory allocation #20
Workflow file for this run
This file contains hidden or 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: 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 |