From f510f6291cd79f06aac887d72285ab58d8d5998c Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Sun, 17 Mar 2024 08:03:27 +0300
Subject: [PATCH 1/3] fix(ci): merge rust ci jobs into one job
Fix https://git.4rs.nl/awiteb/lprs/issues/1
---
.forgejo/workflows/ci.yml | 37 +++++++++++--------------------------
1 file changed, 11 insertions(+), 26 deletions(-)
diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml
index 75fec83..fb8842f 100644
--- a/.forgejo/workflows/ci.yml
+++ b/.forgejo/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: CI
+name: Rust CI
on:
push:
@@ -7,32 +7,17 @@ on:
branches: [master]
jobs:
- build:
- name: Rust build
+ rust_ci:
+ name: Rust CI
runs-on: debian
steps:
- uses: actions/checkout@v4
- uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
- - run: cargo build
- rustfmt:
- name: Rust format
- runs-on: debian
- steps:
- - uses: actions/checkout@v4
- - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
- - run: cargo fmt -- --check
- check:
- name: Rust check
- runs-on: debian
- steps:
- - uses: actions/checkout@v4
- - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
- - run: cargo check
- clippy:
- name: Rust clippy
- runs-on: debian
- steps:
- - uses: actions/checkout@v4
- - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
- - run: cargo clippy -- -D warnings
-
+ - name: Build the source code
+ run: cargo build
+ - name: Check the code format
+ run: cargo fmt -- --check
+ - name: Run cargo-check
+ run: cargo check
+ - name: Run cargo-clippy
+ run: cargo clippy -- -D warnings
--
2.45.2
From 52f8b313f47b55e8de570b89894729e547b5d131 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Sun, 17 Mar 2024 08:05:10 +0300
Subject: [PATCH 2/3] fix(sumi): Remove white space from the header pattern
---
sumi.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sumi.toml b/sumi.toml
index 602215b..5759f56 100644
--- a/sumi.toml
+++ b/sumi.toml
@@ -54,4 +54,4 @@ types_allowed = ["feat", "fix", "docs", "refactor", "change", "deprecate", "remo
# Rule: Header must match regex pattern.
# Example: '^JIRA-\d+:'.
-header_pattern = '^\w+(\s\(\w+\))?(!)?: \w'
+header_pattern = '^\w+(\(\w+\))?(!)?: \w'
--
2.45.2
From 4e83ceca2ecfcd2600e79b4f7d5773322cf9c1f1 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Sun, 17 Mar 2024 08:17:18 +0300
Subject: [PATCH 3/3] chore: Add more steps to git-sumi action
---
.forgejo/workflows/git-sumi.yml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/.forgejo/workflows/git-sumi.yml b/.forgejo/workflows/git-sumi.yml
index c16221a..2c45af4 100644
--- a/.forgejo/workflows/git-sumi.yml
+++ b/.forgejo/workflows/git-sumi.yml
@@ -1,3 +1,5 @@
+name: Check PR title
+
on:
pull_request:
types:
@@ -6,13 +8,15 @@ on:
- reopened
jobs:
- main:
+ check_pr_title:
runs-on: debian
steps:
- uses: https://code.forgejo.org/actions/checkout@v4
- - run: |
- curl -L "https://github.com/welpo/git-sumi/releases/download/v0.0.6/git-sumi-x86_64-unknown-linux-gnu.tar.xz" -o git-sumi.tar.xz
+ - name: Install git-sumi
+ run: |
+ curl -s -L "https://github.com/welpo/git-sumi/releases/download/v0.0.6/git-sumi-x86_64-unknown-linux-gnu.tar.xz" -o git-sumi.tar.xz
tar -xf git-sumi.tar.xz
mv git-sumi-x86_64-unknown-linux-gnu/git-sumi git-sumi
chmod +x git-sumi
- ./git-sumi "${{ github.event.pull_request.title }}"
+ - name: Run git-sumi
+ run: ./git-sumi "${{ github.event.pull_request.title }}"
--
2.45.2