Skip to content

UPLOAD-1798/gha-playwright #712

UPLOAD-1798/gha-playwright

UPLOAD-1798/gha-playwright #712

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
env:
CI: true
TEST_REPORTS_DIR: ./playwright/test-reports
steps:
- uses: actions/checkout@v4
- name: Install podman compse
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
env:
TEST_REPORT_JSON: fs-test-report.json
TEST_RESULTS_DIR: ./playwright/test-results/fs-results
run: |
podman-compose -f docker-compose.yml -f docker-compose.e2e.yml up -d --remove-orphans cache upload-server
podman-compose -f docker-compose.yml -f docker-compose.e2e.yml up --no-recreate --exit-code-from playwright
# - name: Run E2E Tests - Azure
# env:
# TEST_REPORT_JSON: azure-test-report.json
# TEST_RESULTS_DIR: ./playwright/test-results/azure-results
# AZURITE_STORAGE_KEY: ${{ secrets.AZURITE_STORAGE_KEY }}
# run: podman-compose -f docker-compose.yml -f docker-compose.azurite.yml -f docker-compose.e2e.yml up --remove-orphans --build --exit-code-from playwright
# - name: Run E2E Tests - AWS
# env:
# TEST_REPORT_JSON: aws-test-report.json
# TEST_RESULTS_DIR: ./playwright/test-results/aws-results
# run: podman-compose -f docker-compose.yml -f docker-compose.minio.yml -f docker-compose.e2e.yml up --remove-orphans --build --exit-code-from playwright
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright
path: playwright/
retention-days: 30
simulation-test:
needs: e2e-tests
if: ${{ always() }}
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