From 69b6ee6f0e284e890a4be5dd1c219441a90aaeae Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Sun, 2 Apr 2023 14:58:12 -0400 Subject: [PATCH] Implement GitHub CI workflow * This may need to change, especially changing the actual tests to work easily with `cargo test` * dependabot will automatically propose updates * please rename primary branch to `main` for consistency - makes things much easier in the long run. --- .github/dependabot.yml | 13 +++++++++++++ .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6c4c8b8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: +# Maintain dependencies for GitHub Actions +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" +- package-ecosystem: cargo + directory: "/" + schedule: + interval: daily + time: "02:00" + open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c3dfff7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + release: + types: [published] + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - run: | + export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse + # ^^ the above line should be removed once it becomes a standard feature of cargo beyond 1.70 + set -x + rustc --version + cargo --version + cargo fmt --all -- --check + cargo clippy -- -D warnings + cargo build + cargo build --no-default-features + cargo test + cargo test --no-default-features + cargo test --doc