From 31b406db8e8fcd8ccaca504094d13b45ab3c9516 Mon Sep 17 00:00:00 2001 From: Kirill Date: Mon, 2 Mar 2026 14:18:45 +0300 Subject: [PATCH] Ci: get ci from 1 job to 5 --- .forgejo/workflows/main.yaml | 59 ++++++++++++++++++++++++++++++++++-- .github/workflows/main.yaml | 59 ++++++++++++++++++++++++++++++++++-- 2 files changed, 114 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/main.yaml b/.forgejo/workflows/main.yaml index d995eba..088b7dd 100644 --- a/.forgejo/workflows/main.yaml +++ b/.forgejo/workflows/main.yaml @@ -5,7 +5,27 @@ env: CARGO_TERM_COLOR: always jobs: - build-and-test: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Verify Rust installation + run: | + rustc --version + cargo --version + + - name: Build + run: cargo check --verbose + + build: runs-on: ubuntu-latest steps: @@ -24,9 +44,43 @@ jobs: - name: Build run: cargo build --verbose + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Verify Rust installation + run: | + rustc --version + cargo --version - name: Test run: cargo test --verbose + + docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Verify Rust installation + run: | + rustc --version + cargo --version - name: Build documentation run: cargo doc --no-deps --document-private-items @@ -35,9 +89,10 @@ jobs: run: mkdir -p ./docs-output && cp -r target/doc/* ./docs-output/ - name: Upload documentation as artifact - uses: actions/upload-artifact@v3 # Понижена версия для совместимости с GHES + uses: actions/upload-artifact@v3 with: name: rust-documentation path: ./docs-output/ retention-days: 30 if-no-files-found: error + diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0e80219..6a48463 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,7 +5,27 @@ env: CARGO_TERM_COLOR: always jobs: - build-and-test: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Verify Rust installation + run: | + rustc --version + cargo --version + + - name: Build + run: cargo check --verbose + + build: runs-on: ubuntu-latest steps: @@ -24,9 +44,43 @@ jobs: - name: Build run: cargo build --verbose + + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Verify Rust installation + run: | + rustc --version + cargo --version - name: Test run: cargo test --verbose + + docs: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Verify Rust installation + run: | + rustc --version + cargo --version - name: Build documentation run: cargo doc --no-deps --document-private-items @@ -35,9 +89,10 @@ jobs: run: mkdir -p ./docs-output && cp -r target/doc/* ./docs-output/ - name: Upload documentation as artifact - uses: actions/upload-artifact@v4 # Понижена версия для совместимости с GHES + uses: actions/upload-artifact@v4 with: name: rust-documentation path: ./docs-output/ retention-days: 30 if-no-files-found: error +