From 1ab81dbb1078f4953559782e95cef5c75f235757 Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Tue, 14 Nov 2023 09:18:47 -0600 Subject: [PATCH] add CI --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..af2a1ee --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + # Make sure CI fails on all warnings, including Clippy lints + RUSTFLAGS: "-Dwarnings" + +jobs: + lint: + # Name the Job + name: Lint Code Base + # Set the agent to run on + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + with: + # Full git history is needed to get a proper + # list of changed files within `super-linter` + fetch-depth: 0 + + - name: Lint Code Base + uses: super-linter/super-linter@v5 + env: + VALIDATE_ALL_CODEBASE: true + VALIDATE_RUST_2021: true + VALIDATE_RUST_CLIPPY: true + DEFAULT_BRANCH: master + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + test: + name: Rust tests + strategy: + matrix: + environment: [ubuntu-latest, macos-latest, windows-latest] + + runs-on: ${{ matrix.environment }} + + steps: + - uses: actions/checkout@v3 + - run: rustup update + - run: cargo test \ No newline at end of file