Skip to content

chore(deps): update github/codeql-action action to v4.31.9 (#4483) #12493

chore(deps): update github/codeql-action action to v4.31.9 (#4483)

chore(deps): update github/codeql-action action to v4.31.9 (#4483) #12493

Workflow file for this run

# release.yaml is dependant on this name being "main"
name: 'main'
# Ensures that only one workflow is run per branch at a time.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
on:
push:
branches:
- master
- release-[0-9]+.[0-9]+
pull_request:
types:
- opened
- reopened
- synchronize
permissions:
contents: read # for checking out the repository (e.g. actions/checkout)
jobs:
lint-actions:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: zgosalvez/github-actions-ensure-sha-pinned-actions@6124774845927d14c601359ab8138699fa5b70c3 # v4.0.1
install-dependencies:
timeout-minutes: 30
runs-on: ubuntu-latest
needs:
- lint-actions
outputs:
spec_groups: ${{ steps.set-groups.outputs.result }}
packages: ${{ steps.meta.outputs.packages }}
unit: ${{ steps.meta.outputs.unit }}
preview: ${{ steps.meta.outputs.preview }}
e2e: ${{ steps.meta.outputs.e2e }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/bootstrap/
with:
install-cmd: |
make install
- id: meta
run: |
echo "packages<<EOF" >> $GITHUB_OUTPUT
make meta/packages >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "unit<<EOF" >> $GITHUB_OUTPUT
make meta/unit >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "preview<<EOF" >> $GITHUB_OUTPUT
make meta/preview >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "e2e<<EOF" >> $GITHUB_OUTPUT
make meta/e2e >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- id: set-groups
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
THREAD_COUNT: 4
with:
script: |
const ci = require('@kumahq/config/ci')
const json = {
'@kumahq/kuma-gui': ci.getPartitionedTestFiles(process.env.THREAD_COUNT, 'packages/kuma-gui/'),
}
return json
lint-tests:
timeout-minutes: 30
needs:
- install-dependencies
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJSON(needs.install-dependencies.outputs.packages) }}
name: |
Linting ${{ matrix.package.name }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/bootstrap/
- run: |
make -C ${{ matrix.package.path }} lint
cli-tests:
timeout-minutes: 30
needs:
- install-dependencies
runs-on: ubuntu-latest
strategy:
matrix:
package: ${{ fromJSON(needs.install-dependencies.outputs.unit) }}
name: |
Unit tests: ${{ matrix.package.name }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/bootstrap/
- run: |
make -C ${{ matrix.package.path }} test/unit
browser-tests:
timeout-minutes: 30
needs:
- install-dependencies
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.install-dependencies.outputs.e2e) }}
container: [0, 1, 2, 3]
name: |
Browser tests: ${{ matrix.package.name }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/bootstrap/
- run: |
make -C ${{ matrix.package.path }} run/e2e &
make -C ${{ matrix.package.path }} \
CYPRESS_SPEC="$(echo '${{ needs.install-dependencies.outputs.spec_groups }}' | jq -cMr '.["${{ matrix.package.name }}"]' | jq -cMr '.[${{ matrix.container }}]')" \
test/e2e
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: failure()
with:
name: cypress-artifacts-${{ matrix.package.slug }}-${{ matrix.container }}
retention-days: ${{ github.event_name == 'pull_request' && 3 || 30 }}
path: |
${{ matrix.package.path }}/cypress/screenshots
${{ matrix.package.path }}/cypress/videos
post-checks:
# There is a branch protection rule on the repo that requires "branch-protection" to
# be successful
name: branch-protection
#
needs:
- lint-tests
- cli-tests
- browser-tests
runs-on: ubuntu-latest
if: |
always()
steps:
- name: Check for failures
if: |
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
run: echo '${{toJSON(needs)}}' && exit 1
- run: echo "Successful"