Make parser producer recycle temporary XML buffer #53
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
name: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Check code format | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
test: | |
name: Test (${{ matrix.rust-toolchain }}, ${{ matrix.features }}) | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
matrix: | |
rust-toolchain: | |
- stable | |
- beta | |
- nightly | |
features: | |
- "--no-default-features" | |
- "--all-features" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup Rust ${{ matrix.rust-toolchain }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust-toolchain }} | |
override: true | |
- name: Setup cache for cargo | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-${{ matrix.rust-toolchain }} | |
- name: Test code | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: ${{ matrix.features }} | |
cover: | |
name: Coverage (${{ matrix.features }}) | |
runs-on: ubuntu-latest | |
needs: test | |
if: "!startsWith(github.ref, 'refs/tags/v')" | |
strategy: | |
matrix: | |
features: | |
- "--no-default-features" | |
- "--all-features" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Setup cache for cargo | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-${{ matrix.rust-toolchain }} | |
- name: Measure code coverage with ${{ matrix.features }} | |
uses: actions-rs/[email protected] | |
with: | |
version: '0.19.0' | |
args: '--lib -v --out Xml --ciserver github-actions ${{ matrix.features }}' | |
- name: Upload coverage statistics | |
uses: codecov/codecov-action@v2 | |
with: | |
flags: ${{ matrix.features }} | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
environment: Crates.io | |
needs: test | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
- name: Setup Rust ${{ matrix.rust-toolchain }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Package and publish | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: --token ${{ secrets.CRATES_IO_TOKEN }} | |
release: | |
environment: GitHub Releases | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/v')" | |
name: Release | |
needs: publish | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: Release a Changelog | |
uses: rasmus-saks/[email protected] | |
with: | |
github-token: '${{ secrets.GITHUB_TOKEN }}' |