Revamp JoinRecords #167
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: Playwright Tests | |
permissions: read-all | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
name: Run Playwright Tests | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
#services: | |
# minio: | |
# image: quay.io/minio/minio | |
# ports: | |
# - '9000:9000' | |
# - '9001:9001' | |
# #networks: | |
# # - api | |
# volumes: | |
# - 'minio_data:/data' | |
# command: server /data --console-address ":9001" | |
# environment: | |
# - MINIO_ROOT_USER=sampleaccesskey | |
# - MINIO_ROOT_PASSWORD=samplesecretkey | |
# - MINIO_DEFAULT_BUCKETS=meshdb-join-form-log | |
# # I hate computers: https://github.com/minio/minio/issues/4769 | |
# createbuckets: | |
# image: minio/mc | |
# depends_on: | |
# - minio | |
# entrypoint: > | |
# /bin/sh -c " | |
# /usr/bin/mc config host add myminio http://minio:9000 sampleaccesskey samplesecretkey; | |
# /usr/bin/mc mb myminio/meshdb-join-form-log; | |
# exit 0; | |
# " | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 | |
with: | |
node-version: lts/* | |
- name: Setup Minio | |
run: | | |
docker run -d -p 9000:9000 --name minio \ | |
-e "MINIO_ACCESS_KEY=sampleaccesskey" \ | |
-e "MINIO_SECRET_KEY=samplesecretkey" \ | |
-e "MINIO_DEFAULT_BUCKETS=meshdb-join-form-log" \ | |
-v /tmp/data:/data \ | |
-v /tmp/config:/root/.minio \ | |
minio/minio server /data | |
- name: Initialize Bucket | |
run: | | |
docker run -d --name createbuckets \ | |
minio/mc "/bin/sh -c 'echo creating bucket... && /usr/bin/mc config host add myminio http://minio:9000 sampleaccesskey samplesecretkey && /usr/bin/mc mb myminio/meshdb-join-form-log && echo created bucket && exit 0;'" | |
- name: Install dependencies | |
run: npm ci | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test | |
env: | |
NEXT_PUBLIC_MESHDB_URL: https://127.0.0.1:8000 # Throwaway to make the mock work | |
MESHDB_URL: https://127.0.0.1:8000 # Throwaway to make the mock work | |
# We now check the JoinRecord stuff, so submit that too. | |
JOIN_RECORD_BUCKET_NAME: meshdb-join-form-log | |
JOIN_RECORD_PREFIX: dev-join-form-submissions | |
S3_ENDPOINT: http://127.0.0.1:9000 | |
AWS_ACCESS_KEY_ID: sampleaccesskey | |
AWS_SECRET_ACCESS_KEY: samplesecretkey | |
AWS_REGION: us-east-1 | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |