From 25881761f65b625e95bf91423ce06cad7f5644f4 Mon Sep 17 00:00:00 2001 From: Serhiy Barhamon Date: Sun, 15 Oct 2023 12:18:08 +0200 Subject: [PATCH] I feel so dumb --- .github/workflows/scheduled.yml | 17 ++++++-------- .github/workflows/test.yml | 40 ++++++++++++++++----------------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index bc3b67c..56e996d 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -25,12 +25,11 @@ jobs: - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' run: cargo generate-lockfile - - name: Set env - run: | - echo "CLOUDINARY_API_SECRET=$CLOUDINARY_API_SECRET" >> "$GITHUB_ENV" - echo "CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY" >> "$GITHUB_ENV" - echo "CLOUDINARY_CLOUD_NAME=$CLOUDINARY_CLOUD_NAME" >> "$GITHUB_ENV" - name: cargo test --locked + env: + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} run: cargo test --locked --all-features --all-targets # https://twitter.com/alcuadrado/status/1571291687837732873 update: @@ -50,13 +49,11 @@ jobs: - name: cargo update if: hashFiles('Cargo.lock') != '' run: cargo update - - name: Set env - run: | - echo "CLOUDINARY_API_SECRET=$GITHUB_SHA_SHORT" >> "$GITHUB_ENV" - echo "CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY" >> "$GITHUB_ENV" - echo "CLOUDINARY_CLOUD_NAME=$CLOUDINARY_CLOUD_NAME" >> "$GITHUB_ENV" - name: cargo test if: hashFiles('Cargo.lock') != '' run: cargo test --locked --all-features --all-targets env: RUSTFLAGS: -D deprecated + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01af691..1c412a6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,16 +27,19 @@ jobs: - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' run: cargo generate-lockfile - - name: Set env - run: | - echo "CLOUDINARY_API_SECRET=$CLOUDINARY_API_SECRET" >> "$GITHUB_ENV" - echo "CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY" >> "$GITHUB_ENV" - echo "CLOUDINARY_CLOUD_NAME=$CLOUDINARY_CLOUD_NAME" >> "$GITHUB_ENV" # https://twitter.com/jonhoo/status/1571290371124260865 - name: cargo test --locked + env: + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} run: cargo test --locked --all-features --all-targets # https://github.com/rust-lang/cargo/issues/6669 - name: cargo test --doc + env: + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} run: cargo test --locked --all-features --doc minimal: runs-on: ubuntu-latest @@ -53,12 +56,11 @@ jobs: run: rustup default stable - name: cargo update -Zminimal-versions run: cargo +nightly update -Zminimal-versions - - name: Set env - run: | - echo "CLOUDINARY_API_SECRET=$CLOUDINARY_API_SECRET" >> "$GITHUB_ENV" - echo "CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY" >> "$GITHUB_ENV" - echo "CLOUDINARY_CLOUD_NAME=$CLOUDINARY_CLOUD_NAME" >> "$GITHUB_ENV" - name: cargo test + env: + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} run: cargo test --locked --all-features --all-targets os-check: runs-on: ${{ matrix.os }} @@ -76,12 +78,11 @@ jobs: - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' run: cargo generate-lockfile - - name: Set env - run: | - echo "CLOUDINARY_API_SECRET=$CLOUDINARY_API_SECRET" >> "$GITHUB_ENV" - echo "CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY" >> "$GITHUB_ENV" - echo "CLOUDINARY_CLOUD_NAME=$CLOUDINARY_CLOUD_NAME" >> "$GITHUB_ENV" - name: cargo test + env: + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} run: cargo test --locked --all-features --all-targets coverage: runs-on: ubuntu-latest @@ -99,12 +100,11 @@ jobs: - name: cargo generate-lockfile if: hashFiles('Cargo.lock') == '' run: cargo generate-lockfile - - name: Set env - run: | - echo "CLOUDINARY_API_SECRET=$CLOUDINARY_API_SECRET" >> "$GITHUB_ENV" - echo "CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY" >> "$GITHUB_ENV" - echo "CLOUDINARY_CLOUD_NAME=$CLOUDINARY_CLOUD_NAME" >> "$GITHUB_ENV" - name: cargo llvm-cov + env: + CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }} + CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }} + CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }} run: cargo llvm-cov --locked --all-features --lcov --output-path lcov.info - name: Upload to codecov.io uses: codecov/codecov-action@v3