From a89f0f57e11fb0880cc58ad461f3114fe1b91085 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Thu, 24 Jun 2021 12:25:09 -0700 Subject: [PATCH 1/3] github actions: Create workflow Enable basic build and test on Github's continuous integration platform. This is just the default suggested rust workflow. --- .github/workflows/rust.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..7ae98f3b1 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,22 @@ +name: Rust + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From a76a0fe8fd4a0fc09d9269461eaf47da4aa2f91d Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Thu, 24 Jun 2021 12:54:27 -0700 Subject: [PATCH 2/3] github actions: Run on both default branches. Run on pushes to and pull requests against both the new-style `main` default branch name, and the older `master` so the configuration is useful in older forks, including upstream. --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7ae98f3b1..a30418d1f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: Rust on: push: - branches: [ main ] + branches: [ main, master ] pull_request: - branches: [ main ] + branches: [ main, master ] env: CARGO_TERM_COLOR: always From 3e9afafbbc082a2b5d547d1964eaebce29e720ed Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Thu, 24 Jun 2021 12:59:28 -0700 Subject: [PATCH 3/3] github actions: Run once a month. Schedule a job periodically based on elapsed time, even if there have been no recent changes. This runs the integration build and test steps on the default branch. It can be helpful to point out issues arising from the changing build environment when the project itself isn't seeing frequent updates. --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a30418d1f..ec5660dcd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,6 +5,8 @@ on: branches: [ main, master ] pull_request: branches: [ main, master ] + schedule: + - cron: '6 12 1 * *' env: CARGO_TERM_COLOR: always