UPLOAD-1798/gha-playwright #729
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: "CI - Upload Server" | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- upload-server/** | |
defaults: | |
run: | |
working-directory: upload-server/ | |
jobs: | |
unit-test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22.0 | |
- name: Vet | |
run: go vet ./... | |
- name: Run Tests | |
run: go test -coverprofile=c.out -coverpkg=./... ./... | |
- name: Show coverage | |
run: go tool cover -func=c.out | |
- name: Build Check | |
run: go build -o upload-server ./cmd/main.go | |
e2e-tests: | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
env: | |
CI: true | |
TEST_REPORTS_DIR: ./playwright-output/test-reports | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install podman compose | |
run: pip3 install podman-compose | |
# - name: Pull Images | |
# run: podman-compose -f docker-compose.yml -f docker-compose.azurite.yml -f docker-compose.minio.yml -f docker-compose.e2e.yml pull | |
- name: Run E2E Tests - File System | |
id: fsTest | |
env: | |
TEST_RESULTS_DIR: ./playwright-output/test-results/fs-results | |
run: podman-compose -f docker-compose.e2e.yml up --build --exit-code-from playwright | |
- name: Tear Down - File System | |
run: podman-compose -f docker-compose.e2e.yml down | |
- name: Run E2E Tests - Azure | |
id: azureTest | |
env: | |
TEST_RESULTS_DIR: ./playwright-output/test-results/azure-results | |
AZURITE_STORAGE_KEY: ${{ secrets.AZURITE_STORAGE_KEY }} | |
run: podman-compose -f docker-compose.e2e.azure.yml up --build --exit-code-from playwright | |
- name: Tear Down - Azure | |
run: podman-compose -f docker-compose.e2e.azure.yml down | |
- name: Run E2E Tests - AWS | |
id: awsTest | |
env: | |
TEST_RESULTS_DIR: ./playwright-output/test-results/aws-results | |
run: podman-compose -f docker-compose.e2e.aws.yml up --build --exit-code-from playwright | |
- name: Tear Down - AWS | |
run: podman-compose -f docker-compose.e2e.aws.yml down | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright | |
path: ../tests/smoke/playwright/playwright-output | |
retention-days: 30 | |
outputs: | |
actualResult: ${{ steps.fsTest.conclusion == 'failure' || steps.azureTest.conclusion == 'failure' || steps.awsTest.conclusion == 'failure' }} | |
simulation-test: | |
name: Simulation Test | |
runs-on: ubuntu-latest | |
env: | |
AZURITE_STORAGE_KEY: ${{ secrets.AZURITE_STORAGE_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install podman compose | |
run: pip3 install podman-compose | |
- name: Run Tests | |
run: podman-compose -f docker-compose.yml -f docker-compose.azurite.yml -f docker-compose.minio.yml -f docker-compose.testing.yml up --exit-code-from upload-server | |
- name: Show coverage | |
run: go tool cover -func=c.out | |
run-fortify-scan: | |
uses: ./.github/workflows/remote-cd-trigger-template.yml | |
with: | |
WORKFLOW: fortify.yml | |
REF: ${{ github.head_ref }} | |
secrets: inherit |