From b1a2d28351d7d2fd7947d596e73a5a7c7e61a97b Mon Sep 17 00:00:00 2001 From: Florian PAUL Date: Mon, 16 Sep 2024 14:26:41 +0200 Subject: [PATCH 1/2] ci: check releases --- .github/check-release-issue-template.md | 5 +++ .github/workflows/check-all-releases.yml | 54 ++++++++++++++++++++++++ .github/workflows/check-release.yml | 46 ++++++++++++++++++++ .github/workflows/it-tests.yml | 21 +++++++-- 4 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 .github/check-release-issue-template.md create mode 100644 .github/workflows/check-all-releases.yml create mode 100644 .github/workflows/check-release.yml diff --git a/.github/check-release-issue-template.md b/.github/check-release-issue-template.md new file mode 100644 index 0000000000..40334cc08f --- /dev/null +++ b/.github/check-release-issue-template.md @@ -0,0 +1,5 @@ +--- +title: Some releases are failing the tests +labels: bug +--- +On {{ date | date('D MMM YYYY') }} some releases failed the automated tests. Check the [action result]({{ env.RUN_URL }}). diff --git a/.github/workflows/check-all-releases.yml b/.github/workflows/check-all-releases.yml new file mode 100644 index 0000000000..8ae529cfa6 --- /dev/null +++ b/.github/workflows/check-all-releases.yml @@ -0,0 +1,54 @@ +name: Check all releases (latest patch of each minor version for the last 3 majors) + +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 6" + +permissions: + contents: read + issues: write + +env: + YARN_ENABLE_HARDENED_MODE: 0 + +jobs: + findTags: + runs-on: ubuntu-latest + outputs: + tags: ${{ steps.getTags.outputs.TAGS }} + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + fetch-depth: 0 + fetch-tags: true + - name: Get the latest patch of each minor version for the last 3 majors + run: | + SUPPORTED_MAJORS=$(git tag -l | sort -V | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | awk -F. '{print $1}' | uniq | tail -n 3) + ALL_MINOR_TAGS=$(git tag -l | grep -E "^($SUPPORTED_MAJORS)\." | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | awk -F. '{print $1"."$2}' | uniq | xargs -I {} sh -c 'git tag -l "{}.*" | sort -V | tail -n 1' | xargs -d'\n' -I {} echo '"{}"' | tr '\n' ',') + echo "TAGS=[ALL_MINOR_TAGS]" >> "$GITHUB_OUTPUT" + id: getTags + + checkRelease: + needs: findTags + strategy: + fail-fast: false + matrix: + tag: ${{ fromJSON(needs.findTags.outputs.tags) }} + uses: ./.github/workflows/check-release.yml + with: + ref: ${{ matrix.tag }} + + report: + runs-on: ubuntu-latest + needs: checkRelease + if: failure() + steps: + - name: Create an issue + uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_URL: ${{ format('https://github.com/{0}/actions/runs/{1}/attempts/{2}', github.repository, github.run_id, github.run_attempt || 1) }} + with: + filename: .github/check-release-issue-template.md + update_existing: true diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 0000000000..ad3f0e40e4 --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,46 @@ +name: Check release + +on: + workflow_dispatch: + inputs: + ref: + type: string + required: true + description: The branch, tag or SHA to checkout. + workflow_call: + inputs: + ref: + type: string + default: '' + description: The branch, tag or SHA to checkout. + secrets: + NX_CLOUD_ACCESS_TOKEN: + required: false + description: Token to use Nx Cloud token + +env: + YARN_ENABLE_HARDENED_MODE: 0 + +jobs: + buildRelease: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.ref }} + - uses: ./tools/github-actions/setup + - uses: ./.github/actions/setup-java + with: + install-jdk: 'true' + - run: yarn build:swagger-gen + - run: yarn build + - uses: ./tools/github-actions/upload-build-output + with: + artifactName: 'dist-${{ inputs.ref }}' + + testRelease: + needs: [buildRelease] + uses: ./.github/workflows/it-tests.yml + with: + ref: ${{ inputs.ref }} + skipNxCache: true diff --git a/.github/workflows/it-tests.yml b/.github/workflows/it-tests.yml index fcf6829ca9..776ca090d1 100644 --- a/.github/workflows/it-tests.yml +++ b/.github/workflows/it-tests.yml @@ -8,6 +8,10 @@ on: default: false required: false description: Skip the nx cache + ref: + type: string + default: '' + description: The branch, tag or SHA to checkout. secrets: NX_CLOUD_ACCESS_TOKEN: required: false @@ -27,7 +31,11 @@ jobs: NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.ref }} - uses: ./tools/github-actions/download-build-output + with: + artifactName: ${{ inputs.ref && format('dist-{0}', inputs.ref) || 'dist' }} - uses: ./tools/github-actions/setup - name: Setup verdaccio once for all tests id: setup-verdaccio @@ -43,7 +51,7 @@ jobs: - name: Publish verdaccio storage uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: - name: verdaccio + name: ${{ inputs.ref && format('verdaccio-{0}', inputs.ref) || 'verdaccio' }} path: verdaccio.zip - name: Stop verdaccio if: always() @@ -64,7 +72,11 @@ jobs: PREPARE_TEST_ENV_TYPE: ${{ matrix.testEnvironment }} steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: ${{ inputs.ref }} - uses: ./tools/github-actions/download-build-output + with: + artifactName: ${{ inputs.ref && format('dist-{0}', inputs.ref) || 'dist' }} - uses: ./tools/github-actions/setup - shell: bash run: | @@ -77,6 +89,7 @@ jobs: run: echo "currentMonth=$(date +'%Y-%m')" >> $GITHUB_ENV shell: bash - name: Cache test-app yarn + if: inputs.ref == '' uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 with: path: | @@ -89,7 +102,7 @@ jobs: - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 name: Download verdaccio storage prepared in the previous job with: - name: verdaccio + name: ${{ inputs.ref && format('verdaccio-{0}', inputs.ref) || 'verdaccio' }} path: '.' - name: Setup verdaccio once for all tests id: setup-verdaccio @@ -122,13 +135,13 @@ jobs: if: failure() && steps.it-tests.conclusion == 'failure' uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: - name: it-tests-${{ matrix.os }}-${{ matrix.packageManager }} + name: it-tests-${{ matrix.os }}-${{ matrix.packageManager }}-${{ inputs.ref }} path: it-tests.zip - name: Publish tests reports if: always() uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: - name: it-reports-${{ matrix.os }}-${{ matrix.packageManager }} + name: it-reports-${{ matrix.os }}-${{ matrix.packageManager }}-${{ inputs.ref }} path: 'packages/**/dist-test/it-report.xml' - name: Stop verdaccio if: always() && runner.os == 'Linux' From f2b5a860d2ddb55b235dce35834a2c3ae8f3a429 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:43:22 +0000 Subject: [PATCH 2/2] chore(deps): update design factory dependencies to ~32.2.0 --- apps/chrome-devtools/package.json | 4 ++-- apps/showcase/package.json | 4 ++-- package.json | 4 ++-- yarn.lock | 40 +++++++++++++++---------------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/apps/chrome-devtools/package.json b/apps/chrome-devtools/package.json index 89f24b66b8..8a88ce3005 100644 --- a/apps/chrome-devtools/package.json +++ b/apps/chrome-devtools/package.json @@ -102,8 +102,8 @@ "@o3r/styling": "workspace:^", "@popperjs/core": "^2.11.5", "@types/color": "^3.0.6", - "ag-grid-angular": "~32.1.0", - "ag-grid-community": "~32.1.0", + "ag-grid-angular": "~32.2.0", + "ag-grid-community": "~32.2.0", "bootstrap": "5.3.3", "rxjs": "^7.8.1", "tinycolor2": "^1.6.0", diff --git a/apps/showcase/package.json b/apps/showcase/package.json index 67779ade4a..d8e7b1c864 100644 --- a/apps/showcase/package.json +++ b/apps/showcase/package.json @@ -68,8 +68,8 @@ "@webcontainer/api": "~1.2.4", "@xterm/addon-fit": "^0.10.0", "@xterm/xterm": "^5.0.0", - "ag-grid-angular": "~32.1.0", - "ag-grid-community": "~32.1.0", + "ag-grid-angular": "~32.2.0", + "ag-grid-community": "~32.2.0", "bootstrap": "5.3.3", "highlight.js": "^11.8.0", "intl-messageformat": "~10.5.1", diff --git a/package.json b/package.json index 763c0b398d..7812201048 100644 --- a/package.json +++ b/package.json @@ -214,8 +214,8 @@ "@typescript-eslint/types": "^7.14.1", "@typescript-eslint/utils": "^7.14.1", "@yarnpkg/sdks": "^3.0.0", - "ag-grid-angular": "~32.1.0", - "ag-grid-community": "~32.1.0", + "ag-grid-angular": "~32.2.0", + "ag-grid-community": "~32.2.0", "babel-loader": "^9.0.0", "bootstrap": "5.3.3", "bootstrap-icons": "^1.11.3", diff --git a/yarn.lock b/yarn.lock index 469fe313ae..4199ac0297 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6874,8 +6874,8 @@ __metadata: "@typescript-eslint/parser": "npm:^7.14.1" "@typescript-eslint/types": "npm:^7.14.1" "@typescript-eslint/utils": "npm:^7.14.1" - ag-grid-angular: "npm:~32.1.0" - ag-grid-community: "npm:~32.1.0" + ag-grid-angular: "npm:~32.2.0" + ag-grid-community: "npm:~32.2.0" archiver: "npm:^7.0.0" bootstrap: "npm:5.3.3" chokidar: "npm:^3.5.2" @@ -7984,8 +7984,8 @@ __metadata: "@typescript-eslint/types": "npm:^7.14.1" "@typescript-eslint/utils": "npm:^7.14.1" "@yarnpkg/sdks": "npm:^3.0.0" - ag-grid-angular: "npm:~32.1.0" - ag-grid-community: "npm:~32.1.0" + ag-grid-angular: "npm:~32.2.0" + ag-grid-community: "npm:~32.2.0" babel-loader: "npm:^9.0.0" bootstrap: "npm:5.3.3" bootstrap-icons: "npm:^1.11.3" @@ -8838,8 +8838,8 @@ __metadata: "@webcontainer/api": "npm:~1.2.4" "@xterm/addon-fit": "npm:^0.10.0" "@xterm/xterm": "npm:^5.0.0" - ag-grid-angular: "npm:~32.1.0" - ag-grid-community: "npm:~32.1.0" + ag-grid-angular: "npm:~32.2.0" + ag-grid-community: "npm:~32.2.0" bootstrap: "npm:5.3.3" concurrently: "npm:^8.0.0" eslint: "npm:^8.57.0" @@ -14117,32 +14117,32 @@ __metadata: languageName: node linkType: hard -"ag-charts-types@npm:10.1.0": - version: 10.1.0 - resolution: "ag-charts-types@npm:10.1.0" - checksum: 10/75b4f0447e8ab5a52095b5822a1c926863a8d63125af14e15e40e36aa077ec962a4ccabc11e78fe8a6b912cae5f188f9fce1bc243e775c85d6c27b8760884d04 +"ag-charts-types@npm:10.2.0": + version: 10.2.0 + resolution: "ag-charts-types@npm:10.2.0" + checksum: 10/f6aee22c0d99606535131e3ffcafb30c4f60ee219fd014993ad5d1898aaa0db49a1d608fa725601acfd92eb9a0880e6a7a236113552498f0e51a97554687561f languageName: node linkType: hard -"ag-grid-angular@npm:~32.1.0": - version: 32.1.0 - resolution: "ag-grid-angular@npm:32.1.0" +"ag-grid-angular@npm:~32.2.0": + version: 32.2.0 + resolution: "ag-grid-angular@npm:32.2.0" dependencies: tslib: "npm:^2.3.0" peerDependencies: "@angular/common": ">= 16.0.0" "@angular/core": ">= 16.0.0" - ag-grid-community: 32.1.0 - checksum: 10/6b58cec95e7b643bd533b46dd14d92ff1e5bbd9b0d927cf89cc8e9fa9b5da71de5c25a5dd6837bf3eda9d78906fe1398380b8a9b2799e995784fd63b05d3e5bc + ag-grid-community: 32.2.0 + checksum: 10/638b6c12f2d3379ae0dc154f88cfefa211cf8c9a8503c9703ffe01cd4f32bf1db1a095aa40c514c12e0334f4b8170ce349c64493dc3e37042d709fa2e1f6395f languageName: node linkType: hard -"ag-grid-community@npm:~32.1.0": - version: 32.1.0 - resolution: "ag-grid-community@npm:32.1.0" +"ag-grid-community@npm:~32.2.0": + version: 32.2.0 + resolution: "ag-grid-community@npm:32.2.0" dependencies: - ag-charts-types: "npm:10.1.0" - checksum: 10/ee7c434dd69533283f887c1056d1be339350a4cc87cb2affee820d974f4549ef2b2cdbc98350affc7f833987b74db05d715dadaf722d95b6831f52f227d4a690 + ag-charts-types: "npm:10.2.0" + checksum: 10/4eec7211da46ba337e707dcf3de8b5f5d4a1c03bc45da2614235f601b75ba3bad224a4dcb528da634ff670eddd1d4ff0893e1137ccfe7cdaaffa8dd7dba1b0bb languageName: node linkType: hard