UPLOAD-1798/gha-playwright #738
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 | |
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 | |
e2e-tests: | |
name: E2E Tests | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
env: | |
CI: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install podman compose | |
run: pip3 install podman-compose | |
- name: Create folder | |
run: mkdir -p logs | |
- name: Run E2E Tests - File System | |
id: fsTest | |
run: | | |
podman-compose -f docker-compose.e2e.yml up --build --exit-code-from playwright --abort-on-container-exit > /dev/null | |
cat logs/playwright-fs-test.txt && exit $? | |
- name: Run E2E Tests - Azure | |
id: azureTest | |
env: | |
AZURITE_STORAGE_KEY: ${{ secrets.AZURITE_STORAGE_KEY }} | |
run: podman-compose -f docker-compose.e2e.azure.yml up --build --exit-code-from playwright --abort-on-container-exit | |
- name: Run E2E Tests - AWS | |
id: awsTest | |
run: podman-compose -f docker-compose.e2e.aws.yml up --build --exit-code-from playwright --abort-on-container-exit | |
- name: Tear Down Containers | |
run: podman-compose -f docker-compose.e2e.yml -f docker-compose.e2e.azure.yml -f docker-compose.e2e.aws.yml down | |
outputs: | |
actualResult: ${{ steps.fsTest.conclusion == 'failure' || steps.azureTest.conclusion == 'failure' || steps.awsTest.conclusion == 'failure' }} | |
run-fortify-scan: | |
uses: ./.github/workflows/remote-cd-trigger-template.yml | |
with: | |
WORKFLOW: fortify.yml | |
REF: ${{ github.head_ref }} | |
secrets: inherit |