-
Notifications
You must be signed in to change notification settings - Fork 25
75 lines (71 loc) · 1.98 KB
/
main.yaml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
push:
branches:
- main
tags:
- '**'
pull_request:
env:
WEAVIATE_VERSION: 1.24.0-rc.1
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: "Run checks"
run: |
npm install
npm run lint
npm run format:check
tests:
needs: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: "Install dependencies"
run: |
npm install
ci/run_dependencies.sh ${{ env.WEAVIATE_VERSION }}
- name: "Run tests with authentication tests"
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
run: |
npm test
npm run build
- name: "Run tests without authentication tests (for forks)"
if: ${{ github.event.pull_request.head.repo.fork }}
run: |
npm test
npm run build
- name: "Stop Weaviate"
run: ci/stop_dependencies.sh ${{ env.WEAVIATE_VERSION }}
publish:
needs: tests
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci && npm run build
- run: npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }}
- name: "Create a GitHub release"
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
draft: true