This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
generated from technologiestiftung/template-repo-citylab
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.5 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This workflow will do a clean install of node dependencies, build the source code and run tests
name: Node.js CI
env:
NEXT_PUBLIC_SUPABASE_URL: http://localhost:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
SUPABASE_SERVICE_ROLE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU
NEXT_PUBLIC_COLORTHIEF_URL: http://localhost:8080
# Get your key at https://platform.openai.com/account/api-keys
OPENAI_API_KEY: sk-123
NODE_ENV: test
NEXT_PUBLIC_HUMAN_MODELS_PATH: /models
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- run: npm ci
- run: npm run build --if-present
- run: npm run test --if-present
release:
name: semantic-release
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- run: |
npm ci
npx semantic-release --ci
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}