Support enabling new Stripe payment provider (#85) #129
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: Rust | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_VERSION: 1.89.0 | |
| jobs: | |
| static_analysis: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'pull_request' }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: rustup | |
| run: rustup default $RUST_VERSION | |
| - name: cargo-fmt | |
| run: rustup component add rustfmt && cargo fmt --check | |
| - name: cargo-clippy | |
| run: rustup component add clippy && cargo clippy --all-targets --all-features -- --no-deps -D warnings | |
| - name: cargo-machete | |
| run: cargo install cargo-machete && cargo machete | |
| test: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'pull_request' }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: rustup | |
| run: rustup default $RUST_VERSION | |
| - name: test | |
| run: cargo test --all-features | |
| publish: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.event.ref, 'refs/tags/') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: rustup | |
| run: rustup default $RUST_VERSION | |
| - name: publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: cargo publish --token $CARGO_REGISTRY_TOKEN |