This repository was archived by the owner on Jul 6, 2025. It is now read-only.
Features (#2) #6
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 Workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| docker: | |
| image: docker:19.03.12 | |
| options: --privileged | |
| ports: | |
| - 2375:2375 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: --all-features --workspace | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v1 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v1 | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: rustup component add rustfmt | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: rustup component add clippy | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: --all-features --workspace -- -D warnings | |
| coverage: | |
| name: Code coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: install | |
| args: cargo-tarpaulin | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: tarpaulin | |
| args: "--ignore-tests --workspace" | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: main | |
| env: | |
| LOG_IN: echo "Logging in to GitHub Container Registry" | |
| ESLINT: npm run lint | |
| UNIT_TESTS: npm test | |
| VULNERABILITY_CHECKS: python anya/vulnerability_checker.py | |
| ANALYZE_CODE: python anya/ml_code_analyzer.py | |
| COMMIT_PUSH: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git add . | |
| git commit -m "Automated code check, verification, and tests" | |
| git push origin main | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |