build(deps): bump tar from 6.1.13 to 6.2.1 #1193
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: Tests | |
on: push | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
# ---------------------------------------------------------------------------- # | |
# Build container # | |
# ---------------------------------------------------------------------------- # | |
build: | |
name: ποΈ Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@v2.5.0 | |
- name: π³ Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
tags: shlokas-app:latest | |
outputs: type=docker,dest=/tmp/shlokas-app.tar | |
build-args: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | |
ENVIRONMENT=testing:prod | |
- name: π³ Upload artifact | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: shlokas-app | |
path: /tmp/shlokas-app.tar | |
e2e: | |
name: π E2E | |
needs: build | |
strategy: | |
matrix: | |
project: [ 'Mobile Chrome', 'Mobile Safari' ] | |
permissions: | |
packages: read | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: 'akdasa-studios/shlokas-server' | |
- name: π³ Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: shlokas-app | |
path: /tmp | |
- name: π³ Load Docker image | |
run: | | |
docker load --input /tmp/shlokas-app.tar | |
docker container list | |
- name: π³ Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: π³ Start server | |
run: ./shlokas.run.sh testing:prod | |
shell: bash | |
- name: π§ͺ Testing | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: ghcr.io/akdasa-studios/shlokas-e2e:latest | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: | | |
-e CI=1 | |
-e SHLOKAS_URL=http://shlokas | |
-e MAIL_URL=http://mail:1080 | |
-v ${{ github.workspace }}/output:/e2e/output | |
--network shlokas | |
shell: bash | |
run: | | |
npm i | |
npx playwright test --project="${{ matrix.project }}" | |
- name: π [Artifacts] Upload | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v3.1.2 | |
with: | |
name: e2e-${{ matrix.project }} | |
path: output/ | |
retention-days: 5 |