From 0b9f3b2562b8fc71f71ba4354541c1f469802505 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sat, 25 Jan 2025 16:32:03 +0200 Subject: [PATCH 1/3] add github-actions --- .github/dependabot.yml | 13 +++++++++++++ .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 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..719a922 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +--- +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..11bc1ad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +--- +name: Make + +on: + schedule: + - cron: '0 0 1 * *' + push: + branches: + - "**" + pull_request: + branches: + - master + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: ${{ matrix.os }} + timeout-minutes: 120 + strategy: + matrix: + os: + - ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Cargo + if: runner.os == 'Linux' + shell: bash + run: | + set -xeuo pipefail + cargo test --quiet + cargo build --quiet --ignore-rust-version + cargo clippy --quiet --ignore-rust-version + cargo fmt --check --all + From 2186531c39290d74cdbc3dab45dfdb78a8f30fb5 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sat, 25 Jan 2025 16:46:42 +0200 Subject: [PATCH 2/3] a\fix github-actions --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 902d117..fd56c77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ simplelog = "^0.7" dotenv = "^0.15" getopts = "^0.2" chrono = { version = "^0.4", features = ["serde"] } -nanoid = { git = "https://github.com/nikolay-govorov/nanoid" } +nanoid = "0.4" base64 = "^0.11" From 3946d44cb122bd2bc9eb398b870aaced85cb6c71 Mon Sep 17 00:00:00 2001 From: "Artem V. Ageev" Date: Sat, 25 Jan 2025 16:49:39 +0200 Subject: [PATCH 3/3] fix github-actions --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11bc1ad..89576b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,10 @@ jobs: shell: bash run: | set -xeuo pipefail + sudo bash -c ' + apt-get update + apt-get install -y cargo rust{fmt,-clippy} + ' >/dev/null cargo test --quiet cargo build --quiet --ignore-rust-version cargo clippy --quiet --ignore-rust-version