Skip to content

Frontend

Frontend #2020

name: Frontend
on:
push:
# schedule:
# - cron: "0 5 * * *"
workflow_dispatch:
env:
PROJECT: nig
jobs:
Development-mode:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: rapydo/actions/install@v2
with:
project: ${PROJECT}
swarm: 1
- name: Run Karma
run: |
rapydo pull --quiet frontend
rapydo start frontend
sleep 5
rapydo logs frontend
rapydo shell frontend "yarn install"
rapydo shell frontend "reload-types"
rapydo shell frontend "yarn run test:single"
- name: Coverage
uses: rapydo/actions/coverage@v2
with:
repository: projects/${PROJECT}
project: ${PROJECT}
step: frontend
Production-mode:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: rapydo/actions/install@v2
with:
project: ${PROJECT}
swarm: 1
- name: Production Mode
run: |
rapydo --testing --prod init --force
rapydo password registry --random
rapydo pull --quiet frontend proxy
rapydo build proxy
rapydo start frontend proxy
# In swarm mode --follow no longer stop when the container exits
# rapydo logs --follow frontend
sleep 600
rapydo status
rapydo logs --tail 20 proxy
rapydo logs --tail 20 frontend
rapydo logs --tail 6 frontend | grep "files have been compressed."
curl --insecure -X GET https://localhost