examples/prisma-expressjs4.19-node18 (staging) #48
This file contains hidden or 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: examples/prisma-expressjs4.19-node18 (staging) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/example-prisma-expressjs4.19-node18-staging.yaml' | |
| - 'prisma-expressjs4.19-node18/**' | |
| - '!prisma-expressjs4.19-node18/README.md' | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/example-prisma-expressjs4.19-node18-staging.yaml' | |
| - 'prisma-expressjs4.19-node18/**' | |
| - '!prisma-expressjs4.19-node18/README.md' | |
| schedule: | |
| - cron: '30 16 * * 1-5' | |
| # Automatically cancel in-progress actions on the same branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| UKC_METRO: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1" | |
| UKC_TOKEN: ${{ secrets.UKC_TOKEN }} | |
| KRAFTKIT_NO_CHECK_UPDATES: true | |
| KRAFTKIT_LOG_LEVEL: debug | |
| jobs: | |
| integration: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Test | |
| id: test | |
| uses: unikraft/kraftkit@staging | |
| with: | |
| run: | | |
| set -xe; | |
| cd prisma-expressjs4.19-node18; | |
| kraft cloud deploy \ | |
| --no-start \ | |
| --name prisma-expressjs419-node18-${GITHUB_RUN_ID} \ | |
| --runtime index.unikraft.io/official-staging/base-compat:latest \ | |
| --subdomain prisma-expressjs419-node18-${GITHUB_RUN_ID} \ | |
| -p 443:3000 \ | |
| -M 512 \ | |
| .; | |
| # wait for the instance to start | |
| kraft cloud vm start -w 5s prisma-expressjs419-node18-${GITHUB_RUN_ID}; | |
| sleep 5; | |
| curl -Lv --fail-with-body --max-time 10 https://prisma-expressjs419-node18-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app/feed | |
| - name: Cleanup | |
| uses: unikraft/kraftkit@staging | |
| if: always() | |
| with: | |
| run: | | |
| set -xe; | |
| kraft cloud vm stop prisma-expressjs419-node18-${GITHUB_RUN_ID} || true; | |
| kraft cloud vm logs prisma-expressjs419-node18-${GITHUB_RUN_ID} || true; | |
| kraft cloud vm rm prisma-expressjs419-node18-${GITHUB_RUN_ID} || true; | |
| kraft cloud img rm index.unikraft.io/test/prisma-expressjs419-node18-${GITHUB_RUN_ID} || true; |