From e9ac53bb9a64682c4c32f86cf2ec674e2a609e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sat, 21 Mar 2020 05:36:51 +0100 Subject: [PATCH 1/2] Add workflow to check format in CI --- .github/workflows/format.yml | 12 ++++++++++++ rustfmt.toml | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 00000000..55bc79d9 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,12 @@ +name: Format +on: [push, pull_request] +jobs: + native: + runs-on: ubuntu-latest + steps: + - uses: hecrj/setup-rust-action@v1 + with: + components: rustfmt + - uses: actions/checkout@master + - name: Check format + run: cargo fmt --all -- --check diff --git a/rustfmt.toml b/rustfmt.toml index 7e5dded7..d979d317 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1 @@ max_width=80 -wrap_comments=true -merge_imports=true From b2242c571fe2e809e4f471bdac500e21dd6584e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sat, 21 Mar 2020 05:39:07 +0100 Subject: [PATCH 2/2] Rename job in format workflow to `all` --- .github/workflows/format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 55bc79d9..92caff79 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,7 +1,7 @@ name: Format on: [push, pull_request] jobs: - native: + all: runs-on: ubuntu-latest steps: - uses: hecrj/setup-rust-action@v1