From 002bee3bbafd6c2d8ef15c75386f4e67b779a3da Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 18:43:48 -0400 Subject: [PATCH 01/11] Create build.yml added build action --- .github/workflows/build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..6ce7d38 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,14 @@ +on: [push] +name: build +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: build + uses: actions-rs/cargo@v1 + with: + command: build From 46953dc6430857ec7a869a2f799f30fc0fbf1ee8 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 18:49:39 -0400 Subject: [PATCH 02/11] Update build.yml Added clippy --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ce7d38..a0e9041 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,3 +12,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: build + - name: lint + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.CRATES_IO_TOKEN }} From 8fc12e02de334b5299744c0814fe1a19c1581fd9 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 18:57:30 -0400 Subject: [PATCH 03/11] Update build.yml change token --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a0e9041..608f919 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,4 +15,4 @@ jobs: - name: lint uses: actions-rs/clippy-check@v1 with: - token: ${{ secrets.CRATES_IO_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} From db7b20126c077236c33f2c4dbb5db3210402512c Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:07:32 -0400 Subject: [PATCH 04/11] Create security-audit.yml audit dependencies --- .github/workflows/security-audit.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/security-audit.yml diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml new file mode 100644 index 0000000..fa95789 --- /dev/null +++ b/.github/workflows/security-audit.yml @@ -0,0 +1,18 @@ +name: Security audit +on: + schedule: + - cron: "0 8 * * *" + push: + paths: + - "**/Cargo.*" + pull_request: + branches: + - main +jobs: + security_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} From 83ac6c2f20a6ed0a44d3133f6bfe0cbc8beb2b68 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:13:50 -0400 Subject: [PATCH 05/11] test audit --- Cargo.toml | 1 + src/se_ms_api.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fe84069..081d459 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,3 +15,4 @@ path = "src/se_ms_api.rs" chrono = "0.4" reqwest = { version = "0.11", features = ["json", "blocking", "cookies"] } serde = { version = "1", features = ["derive"] } +lazy_static = "1.4" diff --git a/src/se_ms_api.rs b/src/se_ms_api.rs index 8235fea..3ff53ed 100644 --- a/src/se_ms_api.rs +++ b/src/se_ms_api.rs @@ -37,8 +37,8 @@ //! * [SiteEnergyDetailedReq] / [SiteEnergyDetailedResp] //! -#![deny(unused_crate_dependencies)] -#![deny(unused_extern_crates)] +//#![deny(unused_crate_dependencies)] +//#![deny(unused_extern_crates)] #![warn(missing_docs)] pub mod site_details; From c645f69326ee65414a1a65c8abe569872c13f2c7 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:25:34 -0400 Subject: [PATCH 06/11] Update Cargo.toml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 081d459..1bbcfda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,4 @@ path = "src/se_ms_api.rs" chrono = "0.4" reqwest = { version = "0.11", features = ["json", "blocking", "cookies"] } serde = { version = "1", features = ["derive"] } -lazy_static = "1.4" +time = "0.3.9" From 7789cc591ebcc0f135b1bbaece1c523bc4eb4f97 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:29:09 -0400 Subject: [PATCH 07/11] revert test changes --- Cargo.toml | 1 - src/se_ms_api.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1bbcfda..fe84069 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,3 @@ path = "src/se_ms_api.rs" chrono = "0.4" reqwest = { version = "0.11", features = ["json", "blocking", "cookies"] } serde = { version = "1", features = ["derive"] } -time = "0.3.9" diff --git a/src/se_ms_api.rs b/src/se_ms_api.rs index 3ff53ed..8235fea 100644 --- a/src/se_ms_api.rs +++ b/src/se_ms_api.rs @@ -37,8 +37,8 @@ //! * [SiteEnergyDetailedReq] / [SiteEnergyDetailedResp] //! -//#![deny(unused_crate_dependencies)] -//#![deny(unused_extern_crates)] +#![deny(unused_crate_dependencies)] +#![deny(unused_extern_crates)] #![warn(missing_docs)] pub mod site_details; From 6ba61eb416d351ccc626e9a70944629472f06ca4 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:39:23 -0400 Subject: [PATCH 08/11] Update build.yml --- .github/workflows/build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 608f919..b134e05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,14 @@ jobs: uses: actions-rs/cargo@v1 with: command: build + - name: unit_tests + uses: actions-rs/cargo@v1 + with: + command: test unit + - name: doc_tests + uses: actions-rs/cargo@v1 + with: + command: test --doc - name: lint uses: actions-rs/clippy-check@v1 with: From 0d888568be5b9d41cae18e190127a5b48840d151 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:46:28 -0400 Subject: [PATCH 09/11] Update build.yml --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b134e05..9999dbb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,6 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - - name: unit_tests - uses: actions-rs/cargo@v1 - with: - command: test unit - name: doc_tests uses: actions-rs/cargo@v1 with: From a9cf331fddd93078e07c2b0fa34759586c3ee2a6 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:54:03 -0400 Subject: [PATCH 10/11] Update build.yml --- .github/workflows/build.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9999dbb..72cf811 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,10 +12,16 @@ jobs: uses: actions-rs/cargo@v1 with: command: build + - name: unit_tests + uses: actions-rs/cargo@v1 + with: + command: test + args: unit - name: doc_tests uses: actions-rs/cargo@v1 with: - command: test --doc + command: test + args: --doc - name: lint uses: actions-rs/clippy-check@v1 with: From a2c012d656d9b4d7a073c3a7530988fbdff11ef0 Mon Sep 17 00:00:00 2001 From: Ted <63551230+grtw@users.noreply.github.com> Date: Wed, 20 Apr 2022 19:58:49 -0400 Subject: [PATCH 11/11] Update build.yml --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72cf811..f51bad5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,11 @@ jobs: with: command: test args: --doc + - name: Run rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check - name: lint uses: actions-rs/clippy-check@v1 with: