✨ Add buymeacoffee widget #152
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
fauna: | |
image: fauna/faunadb | |
ports: | |
- 8443:8443 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
node-version-file: '.nvmrc' | |
- run: npm ci | |
- run: cp .env.template .env | |
- run: cat .env >> $GITHUB_ENV | |
- run: npm run --silent db:init | jq '.[-1].secret' | awk '{print "FAUNADB_INVITEE_SECRET="$1}' >> .env | |
- run: npx web-push generate-vapid-keys --json | jq '.publicKey' | awk '{print "VAPID_PUBLIC_KEY="$1}' >> .env | |
- run: npx web-push generate-vapid-keys --json | jq '.privateKey' | awk '{print "VAPID_PRIVATE_KEY="$1}' >> .env | |
- run: cat .env | |
- run: npm run unit | |
- uses: cypress-io/github-action@v5.8.4 | |
with: | |
build: npm run build | |
start: npm run preview | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
if-no-files-found: ignore | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: cypress/videos | |
if-no-files-found: ignore |