Compare commits

...

9 Commits

Author SHA1 Message Date
a4b5f79068 Merge pull request '[FEATURE] Add pipelines' (#1) from feature/pipelines into main
All checks were successful
Cargo Build & Test / Test publish (push) Successful in 9s
Reviewed-on: #1
2024-08-20 10:18:08 +00:00
d13df42dbd Merge branch 'main' into feature/pipelines
All checks were successful
Cargo Build & Test / Tests (pull_request) Successful in 13s
Cargo Build & Test / Test publish (pull_request) Successful in 12s
Cargo Build & Test / check-cargo-version (pull_request) Successful in 5s
2024-08-20 10:16:52 +00:00
69aff9fa3e
Change pipeline name
All checks were successful
Cargo Build & Test / Tests (pull_request) Successful in 9s
Cargo Build & Test / Test publish (pull_request) Successful in 9s
Cargo Build & Test / check-cargo-version (pull_request) Successful in 6s
2024-08-20 12:09:43 +02:00
f351ef4d46
Add pipeline for tests
All checks were successful
Cargo Build & Test / Test publish (pull_request) Successful in 11s
Cargo Build & Test / check-cargo-version (pull_request) Successful in 5s
2024-08-20 12:08:36 +02:00
c76cb8196b
Add publish pipeline
All checks were successful
Cargo Build & Test / Test publish (pull_request) Successful in 8s
Cargo Build & Test / check-cargo-version (pull_request) Successful in 5s
2024-08-20 12:02:07 +02:00
23047dc855
Update cargo version
All checks were successful
Cargo Build & Test / check-cargo-version (pull_request) Successful in 6s
Cargo Build & Test / Test publish (pull_request) Successful in 10s
2024-08-20 11:59:01 +02:00
4ac4c6223d
Check if cargo version is updated
Some checks failed
Cargo Build & Test / check-cargo-version (pull_request) Failing after 6s
Cargo Build & Test / Test publish (pull_request) Successful in 8s
2024-08-20 11:57:40 +02:00
29b0b133fe
Add Cache
All checks were successful
Cargo Build & Test / Test publish (pull_request) Successful in 7s
2024-08-20 10:24:46 +02:00
7bad733ae5
Add pr pipeline
All checks were successful
Cargo Build & Test / Test publish (pull_request) Successful in 6s
2024-08-20 10:23:13 +02:00
4 changed files with 100 additions and 2 deletions

72
.gitea/workflows/ci.yaml Normal file

@ -0,0 +1,72 @@
name: Cargo Build & Test
on:
pull_request:
jobs:
test:
container: git.kjan.de/actions/rust-node
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ⚡ Cache
uses: https://git.kjan.de/actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/release/deps
target/release/build
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-loadstar
- run: cargo test
can-publish:
container: git.kjan.de/actions/rust-node
name: Test publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ⚡ Cache
uses: https://git.kjan.de/actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/release/deps
target/release/build
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-loadstar
- run: cargo publish -n
check-cargo-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get current version from Cargo.toml
id: cargo-version
run: |
# Extract the version from Cargo.toml in the PR branch
CARGO_VERSION=$(grep '^version' Cargo.toml | sed -e 's/version = "//' -e 's/"//')
echo "cargo_version=$CARGO_VERSION" >> $GITHUB_ENV
- name: Get previous version from main branch
id: main-cargo-version
run: |
# Fetch the Cargo.toml from the main branch and extract its version
git fetch origin main
MAIN_CARGO_VERSION=$(git show origin/main:Cargo.toml | grep '^version' | sed -e 's/version = "//' -e 's/"//')
echo "main_cargo_version=$MAIN_CARGO_VERSION" >> $GITHUB_ENV
- name: Compare versions
run: |
if [ "$cargo_version" = "$main_cargo_version" ]; then
echo "Cargo version has not been updated."
exit 1
else
echo "Cargo version has been updated."
fi

@ -0,0 +1,26 @@
name: Cargo Build & Test
on:
push:
branches:
- main
jobs:
can-publish:
container: git.kjan.de/actions/rust-node
name: Test publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ⚡ Cache
uses: https://git.kjan.de/actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target/release/deps
target/release/build
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-loadstar
- run: cargo login ${{ secrets.CRATES_IO_TOKEN }}
- run: cargo publish

2
Cargo.lock generated

@ -22,7 +22,7 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "loadstar"
version = "0.0.2"
version = "0.0.3"
dependencies = [
"tiny_http",
]

@ -2,7 +2,7 @@
name = "loadstar"
description = "A simple web framework for rust"
repository = "https://git.kjan.de/jank/loadstar"
version = "0.0.2"
version = "0.0.3"
license = "GPL-3.0-only"
edition = "2021"