Merge pull request #1 from dev-five-git/changepacks/main #13
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: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - LICENSE | |
| - '**/*.gitignore' | |
| - .editorconfig | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: xd009642/tarpaulin:develop-nightly | |
| options: --security-opt seccomp=unconfined | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Build | |
| run: cargo check | |
| - name: Test | |
| run: cargo tarpaulin --out Lcov | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: lcov.info | |
| if: github.ref_name == 'main' | |
| # publish | |
| changepacks: | |
| name: changepacks | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| # create pull request comments | |
| pull-requests: write | |
| # Actions > General > Workflow permissions for creating pull request | |
| # Create brench to create pull request | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: changepacks/action@main | |
| id: changepacks | |
| - name: Publish | |
| run: cargo publish --workspace | |
| if: ${{ contains(steps.changepacks.outputs.changepacks, 'crates/vespera/Cargo.toml') }} | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |