CI #503
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: | |
| uses: ./.github/workflows/validate_changesets.yaml | |
| 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 | |
| helm: | |
| name: "Helm checks" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: "Install Helm" | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: 'v3.14.0' | |
| - run: rake helm:lint | |
| - run: rake helm:test | |
| - run: rake helm:deployment:check | |
| build_release: | |
| name: "Build every target" | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-unknown-linux-musl | |
| - target: x86_64-unknown-linux-musl | |
| steps: | |
| # Linux targets will cross compile on Docker images used by cross | |
| - name: "Login to Docker Hub" | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{secrets.CI_DOCKERHUB_USERNAME}} | |
| password: ${{secrets.CI_DOCKERHUB_TOKEN}} | |
| - name: "Checkout project" | |
| uses: actions/checkout@v4 | |
| - name: "Build target for ${{matrix.target}}" | |
| run: "rake build:target:${{matrix.target}}" |