1313 IMAGE : nmrium
1414
1515jobs :
16+ e2etest :
17+ runs-on : ubuntu-latest
18+ strategy :
19+ matrix :
20+ project : [chromium, firefox, webkit]
21+ fail-fast : false
22+ steps :
23+ - uses : actions/checkout@v3
24+ - uses : actions/setup-node@v3
25+ with :
26+ node-version : 16.x
27+ - name : Install dependencies
28+ run : npm ci
29+ - name : Install Playwright
30+ run : npx playwright install --with-deps
31+ - name : Build test application
32+ env :
33+ NODE_OPTIONS : ' --max_old_space_size=4096'
34+ run : npm run build-no-minify
35+ - name : Run E2E tests on ${{ matrix.project }}
36+ run : npx playwright test --project ${{ matrix.project }}
37+ continue-on-error : ${{ matrix.project == 'webkit' }}
38+
1639 lint :
1740 runs-on : ubuntu-latest
1841 steps :
@@ -30,38 +53,41 @@ jobs:
3053 run : npm run check-types
3154
3255 setup-build-publish-deploy-dev :
33- name : deploy to dev
56+ name : Deploy to dev
3457 if : github.ref == 'refs/heads/development'
3558 runs-on : ubuntu-latest
36- needs : lint
59+ needs : [ lint, e2etest]
3760 steps :
3861 - name : Checkout
3962 uses : actions/checkout@v2
4063
4164 # Setup gcloud CLI
42- - uses : google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
65+ - name : Setup CLI
66+ uses : google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
4367 with :
4468 service_account_key : ${{ secrets.GKE_SA_KEY }}
4569 project_id : ${{ secrets.GKE_PROJECT }}
4670
4771 # Configure docker to use the gcloud command-line tool as a credential helper
48- - run : |-
72+ - name : Configure docker
73+ run : |-
4974 gcloud auth configure-docker europe-west3-docker.pkg.dev
5075
5176 # Get the GKE credentials so we can deploy to the cluster
52- - uses : google-github-actions/get-gke-credentials@v0.3.0
77+ - name : Get GKE credentials
78+ uses : google-github-actions/get-gke-credentials@v0.3.0
5379 with :
5480 cluster_name : ${{ env.GKE_CLUSTER_DEV }}
5581 location : ${{ env.GKE_ZONE }}
5682 credentials : ${{ secrets.GKE_SA_KEY }}
5783
5884 # Build the Docker image
59- - name : Build Image
85+ - name : Build docker image
6086 run : |-
6187 docker build -f Dockerfile.prod --tag europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest .
6288
6389 # Push the Docker image to Google Artifact Registry
64- - name : Publish Image to Google Artifact Registry
90+ - name : Publish image to Google Artifact Registry
6591 run : |-
6692 docker push "europe-west3-docker.pkg.dev/$PROJECT_ID/$REPOSITORY_NAME_DEV/$IMAGE:latest"
6793
0 commit comments