Just Run Tests #84
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Just Run Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
dev: | |
required: false | |
default: false | |
type: boolean | |
test: | |
required: false | |
default: false | |
type: boolean | |
uat: | |
required: false | |
default: false | |
type: boolean | |
run_performance_tests: | |
required: false | |
default: false | |
type: boolean | |
description: Run performance tests | |
run_e2e_tests_application: | |
required: false | |
default: false | |
type: boolean | |
description: Run e2e tests (application) | |
run_e2e_tests_assessment: | |
required: false | |
default: false | |
type: boolean | |
description: Run e2e tests (assessment) | |
run_python_e2e_tests: | |
required: false | |
default: false | |
type: boolean | |
description: Whether to run the python e2e tests | |
python_e2e_copilot_environment: | |
description: "Copilot environment to run tests on" | |
type: choice | |
options: | |
- dev | |
- test | |
default: dev | |
jobs: | |
run_shared_tests_dev: | |
if: ${{ always() && inputs.dev == true }} | |
uses: ./.github/workflows/run-shared-tests.yml | |
with: | |
run_performance_tests: ${{inputs.run_performance_tests}} | |
run_e2e_tests_application: ${{inputs.run_e2e_tests_application}} | |
run_e2e_tests_assessment: ${{inputs.run_e2e_tests_assessment}} | |
env_name: dev | |
secrets: | |
FSD_GH_APP_ID: ${{ secrets.FSD_GH_APP_ID }} | |
FSD_GH_APP_KEY: ${{ secrets.FSD_GH_APP_KEY }} | |
FS_BASIC_AUTH_USERNAME: ${{ secrets.FS_BASIC_AUTH_USERNAME }} | |
FS_BASIC_AUTH_PASSWORD: ${{ secrets.FS_BASIC_AUTH_PASSWORD }} | |
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }} | |
run_shared_tests_test: | |
if: ${{ always() && inputs.test == true }} | |
uses: ./.github/workflows/run-shared-tests.yml | |
with: | |
run_performance_tests: ${{inputs.run_performance_tests}} | |
run_e2e_tests_application: ${{inputs.run_e2e_tests_application}} | |
run_e2e_tests_assessment: ${{inputs.run_e2e_tests_assessment}} | |
env_name: test | |
secrets: | |
FSD_GH_APP_ID: ${{ secrets.FSD_GH_APP_ID }} | |
FSD_GH_APP_KEY: ${{ secrets.FSD_GH_APP_KEY }} | |
FS_BASIC_AUTH_USERNAME: ${{ secrets.FS_BASIC_AUTH_USERNAME }} | |
FS_BASIC_AUTH_PASSWORD: ${{ secrets.FS_BASIC_AUTH_PASSWORD }} | |
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }} | |
run_shared_tests_uat: | |
if: ${{ always() && inputs.uat == true }} | |
uses: ./.github/workflows/run-shared-tests.yml | |
with: | |
run_performance_tests: ${{inputs.run_performance_tests}} | |
run_e2e_tests_application: ${{inputs.run_e2e_tests_application}} | |
run_e2e_tests_assessment: ${{inputs.run_e2e_tests_assessment}} | |
env_name: uat | |
secrets: | |
FSD_GH_APP_ID: ${{ secrets.FSD_GH_APP_ID }} | |
FSD_GH_APP_KEY: ${{ secrets.FSD_GH_APP_KEY }} | |
FS_BASIC_AUTH_USERNAME: ${{ secrets.FS_BASIC_AUTH_USERNAME }} | |
FS_BASIC_AUTH_PASSWORD: ${{ secrets.FS_BASIC_AUTH_PASSWORD }} | |
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }} | |
run_python_tests: | |
if: ${{ always() && inputs.run_python_e2e_tests == true }} | |
name: python e2e tests | |
permissions: | |
contents: read # This is required for actions/checkout | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.python_e2e_copilot_environment }} | |
steps: | |
- name: Generate a token | |
id: generate_token | |
uses: actions/[email protected] | |
with: | |
app-id: ${{ secrets.FSD_GH_APP_ID }} | |
private-key: ${{ secrets.FSD_GH_APP_KEY }} | |
owner: ${{ github.repository_owner }} | |
repositories: "funding-service-design-e2e-checks" | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Checkout E2E tests | |
uses: actions/[email protected] | |
with: | |
repository: communitiesuk/funding-service-design-e2e-checks | |
path: . | |
token: ${{ steps.generate_token.outputs.token }} | |
ref: proto/playwright | |
- name: debugstuff | |
run: | | |
pwd | |
ls -al | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@e779db74266a80753577425b0f4ee823649f251d # v3 | |
with: | |
enable-cache: true | |
- name: debugstuff2 | |
run: | | |
pwd | |
ls -al | |
- name: Install playwright browsers | |
# working-directory: funding-service-design-e2e-checks | |
run: uv run --frozen playwright install --with-deps | |
- name: Setup AWS credentials | |
uses: communitiesuk/funding-service-design-workflows/.github/actions/copilot_setup@main | |
with: | |
copilot_environment: ${{ inputs.python_e2e_copilot_environment }} | |
AWS_ACCOUNT: ${{ secrets.AWS_ACCOUNT }} | |
- name: Run tests | |
# working-directory: funding-service-design-e2e-checks | |
run: uv run --frozen pytest --e2e-env ${{ inputs.copilot_environment }} | |
env: | |
E2E_DEVTEST_BASIC_AUTH_USERNAME: ${{ secrets.E2E_DEVTEST_BASIC_AUTH_USERNAME }} | |
E2E_DEVTEST_BASIC_AUTH_PASSWORD: ${{ secrets.E2E_DEVTEST_BASIC_AUTH_USERNAME }} |