diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index af99be3a..263d0728 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -15,3 +15,13 @@ jobs: pr_title_format_check: uses: ./.github/workflows/pr_title_check.yml + + regression_tests: + uses: ./.github/workflows/regression_tests.yml + with: + environment: 'dev' + log_level: 'INFO' + tags: '@regression' + id: 'Run during opened pull request' + github_tag: ${{ github.event.pull_request.head.ref }} + secrets: inherit diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index 708cc713..a285a0cc 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -1,10 +1,37 @@ name: Regression Tests on: - workflow_dispatch: + workflow_call: inputs: + environment: + description: 'Environment to run tests against' + type: string + required: false + default: "dev" tags: description: 'Test scenario tags. If you want to specify multiple tags, you should separate them with a colon :' + required: false + type: string + default: "@regression" + log_level: + description: 'Log level to output to console' + type: string + required: false + default: "INFO" + id: + description: "Run identifier (Don't change - Only used for CI)" + type: string + required: false + default: "Run during opened pull request" + github_tag: + description: 'The github tag to run the test pack from' + type: string required: true + + workflow_dispatch: + inputs: + tags: + description: 'Test scenario tags. If you want to specify multiple tags, you should separate them with a colon :' + required: false type: string default: "@regression" environment: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc2a34b3..75984252 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: hooks: - id: lint-githubactions name: Lint github actions - entry: actionlint + entry: scripts/lint-githubactions.sh language: system files: ^.github types_or: [yaml] diff --git a/scripts/lint-githubactions.sh b/scripts/lint-githubactions.sh new file mode 100755 index 00000000..4dddbd21 --- /dev/null +++ b/scripts/lint-githubactions.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# This loads the shims directory directly, as there is no asdf.sh to source. +# The `:-` syntax provides a default value if ASDF_DATA_DIR is not set. +export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:${ASDF_DATA_DIR:-$HOME/.asdf}/bin:$PATH" + +# Execute actionlint +exec actionlint