From 37d4562c32531f0bf2fef9ada696495b8f9628db Mon Sep 17 00:00:00 2001 From: Michael Vlach Date: Sun, 7 Jan 2024 16:45:38 +0100 Subject: [PATCH] update workflows --- .github/workflows/agdb.yaml | 17 ++++++++++------- .github/workflows/agdb_api_rust.yaml | 17 ++++++++++------- .github/workflows/agdb_api_typescript.yaml | 9 +++++---- .github/workflows/agdb_benchmarks.yaml | 19 +++++++++++-------- .github/workflows/agdb_server.yaml | 17 ++++++++++------- .github/workflows/agdb_studio.yaml | 10 +++++----- .github/workflows/agdb_web.yaml | 10 +++++----- .github/workflows/coverage.yaml | 5 +++-- .github/workflows/release.yaml | 20 ++++++++++++-------- 9 files changed, 71 insertions(+), 53 deletions(-) diff --git a/.github/workflows/agdb.yaml b/.github/workflows/agdb.yaml index 64020e06..8227ecc9 100644 --- a/.github/workflows/agdb.yaml +++ b/.github/workflows/agdb.yaml @@ -13,7 +13,7 @@ jobs: outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -22,27 +22,30 @@ jobs: if [[ "$(git diff origin/main --name-only -- ${{ env.PROJECT }}/ agdb_derive/ .github/workflows/${{ env.PROJECT }}.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi agdb_analyse: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo clippy --package ${{ env.PROJECT }} --package agdb_derive --all-targets --all-features -- -D warnings agdb_coverage: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@cargo-llvm-cov - run: rustup component add llvm-tools-preview - run: cargo llvm-cov --package ${{ env.PROJECT }} --package agdb_derive --all-features --ignore-filename-regex "agdb_derive" --fail-uncovered-functions 0 --fail-uncovered-lines 0 --show-missing-lines agdb_format: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo fmt --package ${{ env.PROJECT }} --package agdb_derive --check diff --git a/.github/workflows/agdb_api_rust.yaml b/.github/workflows/agdb_api_rust.yaml index 25262334..3fca4186 100644 --- a/.github/workflows/agdb_api_rust.yaml +++ b/.github/workflows/agdb_api_rust.yaml @@ -13,7 +13,7 @@ jobs: outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -22,27 +22,30 @@ jobs: if [[ "$(git diff origin/main --name-only -- agdb_api/rust agdb/ agdb_derive/ .github/workflows/${{ env.PROJECT }}_rust.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi agdb_api_rust_analyse: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo clippy --package ${{ env.PROJECT }} --all-targets --all-features -- -D warnings agdb_api_rust_coverage: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@cargo-llvm-cov - run: rustup component add llvm-tools-preview - run: cargo llvm-cov --package ${{ env.PROJECT }} --package agdb_server --all-features --ignore-filename-regex "agdb(.|..)src|agdb_server|agdb_derive" --fail-uncovered-functions 0 --fail-uncovered-lines 0 --show-missing-lines agdb_api_rust_format: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo fmt --package ${{ env.PROJECT }} --check diff --git a/.github/workflows/agdb_api_typescript.yaml b/.github/workflows/agdb_api_typescript.yaml index effc5304..c29313b4 100644 --- a/.github/workflows/agdb_api_typescript.yaml +++ b/.github/workflows/agdb_api_typescript.yaml @@ -13,7 +13,7 @@ jobs: outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -29,7 +29,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npm run lint @@ -41,7 +41,8 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: npm ci - run: npm run test - uses: actions/upload-artifact@v3 @@ -59,6 +60,6 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npm run format:check diff --git a/.github/workflows/agdb_benchmarks.yaml b/.github/workflows/agdb_benchmarks.yaml index 57e7f5e6..9289e46d 100644 --- a/.github/workflows/agdb_benchmarks.yaml +++ b/.github/workflows/agdb_benchmarks.yaml @@ -9,11 +9,11 @@ env: jobs: diff: - runs-on: rust + runs-on: ubuntu-latest outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -22,25 +22,28 @@ jobs: if [[ "$(git diff origin/main --name-only -- ${{ env.PROJECT }}/ agdb/src/ agdb/src/Cargo.toml agdb_derive/src/ agdb_derive/Cargo.toml .github/workflows/${{ env.PROJECT }}.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi agdb_benchmarks: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo run --release --package ${{ env.PROJECT }} agdb_benchmarks_analyse: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo clippy --package ${{ env.PROJECT }} --all-targets --all-features -- -D warnings agdb_benchmarks_format: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo fmt --package ${{ env.PROJECT }} --check diff --git a/.github/workflows/agdb_server.yaml b/.github/workflows/agdb_server.yaml index 16d08c93..80ed9e9a 100644 --- a/.github/workflows/agdb_server.yaml +++ b/.github/workflows/agdb_server.yaml @@ -13,7 +13,7 @@ jobs: outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -22,27 +22,30 @@ jobs: if [[ "$(git diff origin/main --name-only -- ${{ env.PROJECT }}/ agdb/src/ agdb/Cargo.toml agdb_derive/src/ agdb_derive/Cargo.toml .github/workflows/${{ env.PROJECT }}.yaml)" != "" ]]; then (echo "diff=true" >> $GITHUB_OUTPUT) fi agdb_server_analyse: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo clippy --package ${{ env.PROJECT }} --all-targets --all-features -- -D warnings agdb_server_coverage: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@cargo-llvm-cov - run: rustup component add llvm-tools-preview - run: cargo llvm-cov --package ${{ env.PROJECT }} --all-features --ignore-filename-regex "agdb(.|..)src|agdb_derive|agdb_api|api.rs" --fail-uncovered-functions 0 --fail-uncovered-lines 0 --show-missing-lines agdb_server_format: - runs-on: rust + runs-on: ubuntu-latest needs: diff if: needs.diff.outputs.diff == 'true' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo fmt --package ${{ env.PROJECT }} --check diff --git a/.github/workflows/agdb_studio.yaml b/.github/workflows/agdb_studio.yaml index 1d6dacee..0cdc013f 100644 --- a/.github/workflows/agdb_studio.yaml +++ b/.github/workflows/agdb_studio.yaml @@ -13,7 +13,7 @@ jobs: outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -29,7 +29,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npm run lint @@ -41,7 +41,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npm run test:unit - uses: actions/upload-artifact@v3 @@ -59,7 +59,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npx playwright install --with-deps - run: npm run build @@ -79,6 +79,6 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npm run format:check diff --git a/.github/workflows/agdb_web.yaml b/.github/workflows/agdb_web.yaml index ce95055f..465b6025 100644 --- a/.github/workflows/agdb_web.yaml +++ b/.github/workflows/agdb_web.yaml @@ -13,7 +13,7 @@ jobs: outputs: diff: ${{ steps.diff.outputs.diff }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - id: diff @@ -29,7 +29,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npx nuxt prepare - run: npm run lint @@ -42,7 +42,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npx nuxt prepare - run: npm run test:unit @@ -61,7 +61,7 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npx playwright install --with-deps - run: npm run build @@ -81,6 +81,6 @@ jobs: run: working-directory: ${{ env.PROJECT }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: npm ci - run: npm run format:check diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index dcfc43a0..5a48c7d3 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -14,9 +14,10 @@ env: jobs: codecov: - runs-on: rust + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@cargo-llvm-cov - run: rustup component add llvm-tools-preview - run: cargo llvm-cov --package agdb --package agdb_server --all-features --ignore-filename-regex "agdb(_derive|_benchmarks)|api.rs" --lcov --output-path lcov.info diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 03f59e3a..669fafe5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,17 +12,19 @@ env: jobs: build: - runs-on: rust + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: cargo build --package agdb_derive --package agdb --all-features --release new_version: - runs-on: rust + runs-on: ubuntu-latest outputs: new_version: ${{ steps.new_version.outputs.new_version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - id: new_version run: | PUBLISHED_VERSION=$(cargo search ^agdb$ --limit 1 -q | head -n 1 | cut -d '"' -f 2) @@ -32,11 +34,12 @@ jobs: echo "Current version: ${CURRENT_VERSION}" release: - runs-on: rust + runs-on: ubuntu-latest needs: [build, new_version] if: needs.new_version.outputs.new_version != '' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" @@ -48,11 +51,12 @@ jobs: generate_release_notes: true publish: - runs-on: rust + runs-on: ubuntu-latest needs: [release, new_version] if: needs.new_version.outputs.new_version != '' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 - run: | cargo publish --package agdb_derive --token ${CRATES_IO_TOKEN} cargo publish --package agdb --token ${CRATES_IO_TOKEN}