From fd4fd624becdbc44077a2c7f89b11719dfa95cbe Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Thu, 22 Jun 2023 15:31:41 -0400 Subject: [PATCH] Migrate rust CI tests to GitHub Actions --- .circleci/config.yml | 25 ------------------------- .github/workflows/ci.yaml | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd5c7ca5a0..7fa126cffd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,27 +94,6 @@ jobs: DOCKER_BUILD_ARGUMENTS="--cache-from securedrop-test-focal-py3:${fromtag:-latest}" securedrop/bin/dev-shell \ bash -c "/opt/venvs/securedrop-app-code/bin/pip3 install --require-hashes -r requirements/python3/develop-requirements.txt && make -C .. lint" - rust: - # Keep version in sync with rust-toolchain.toml - docker: - - image: rust:1.69.0 - environment: - # TODO: Remove after we're on Rust 1.70 - CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse" - steps: - - checkout - - run: - name: Install dependencies - command: | - apt-get update && apt-get install make --yes - rustup component add rustfmt - rustup component add clippy - - run: - name: Lint and test Rust code - command: | - make rust-lint - make rust-test - app-tests: machine: image: ubuntu-2004:202010-01 @@ -359,10 +338,6 @@ workflows: context: - circleci-slack <<: *slack-fail-post-step - - rust: - context: - - circleci-slack - <<: *slack-fail-post-step - app-tests: filters: branches: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 29cb726954..5047967330 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,6 +5,25 @@ defaults: shell: bash jobs: + rust: + runs-on: ubuntu-latest + # Keep version in sync with rust-toolchain.toml + container: rust:1.69.0 + env: + # TODO: Remove after we're on Rust 1.70 + CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse" + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: | + apt-get update && apt-get install make --yes + rustup component add rustfmt + rustup component add clippy + - name: Lint and test Rust code + run: | + make rust-lint + make rust-test + updater-gui-tests: runs-on: ubuntu-latest container: debian:bullseye