CI #209
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 | |
| - develop | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| schedule: | |
| - cron: 0 0 * * 1-5 | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: "${{ !contains(github.ref, 'main')}}" | |
| jobs: | |
| validate-changesets: | |
| name: Validate changesets | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Checkout Mono | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: appsignal/mono | |
| path: tmp/mono | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| - name: Validate changesets | |
| run: tmp/mono/bin/mono changeset validate | |
| build: | |
| name: "cargo build" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: cargo build --verbose | |
| test: | |
| name: "cargo test" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: cargo test --verbose | |
| clippy: | |
| name: "Rust clippy" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup component add clippy | |
| - run: cargo clippy --verbose --tests --all-targets --all-features -- -D warnings | |
| formatter: | |
| name: "Rust formatter" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: rustup component add rustfmt | |
| - run: cargo fmt --check --verbose | |
| cross_compile: | |
| name: "Cross compile" | |
| uses: ./.github/workflows/build_release.yaml | |
| with: | |
| branch: "${{ github.head_ref || github.ref_name }}" | |
| upload_artifacts: false | |
| run_versioning: false | |
| secrets: | |
| DOCKERHUB_USERNAME: ${{secrets.PUBLISH_DOCKERHUB_USERNAME}} | |
| DOCKERHUB_TOKEN: ${{secrets.PUBLISH_DOCKERHUB_TOKEN}} |