-
Notifications
You must be signed in to change notification settings - Fork 28
49 lines (45 loc) · 1.5 KB
/
ci.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
47
48
49
name: CI test
on:
# Triggers the workflow on push or pull request events but only for the dev branch
- pull_request
- push
# Allows you to run this workflow manually from the Actions tab
- workflow_dispatch
jobs:
install-and-test:
runs-on: ubuntu-latest
services:
rumors-test-db:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.3.2
ports:
- 62223:9200
permissions: # Required by google-github-actions/auth
contents: 'read'
id-token: 'write'
steps:
- name: Setup ffmpeg
uses: FedericoCarboni/setup-ffmpeg@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
- uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.GC_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GC_SERVICE_ACCOUNT }}
- run: npm ci
- run: npm run lint
- run: npm run test -- --coverage
env:
GCS_CREDENTIALS: ${{ secrets.GCS_CREDENTIALS }}
GCS_BUCKET_NAME: ${{ secrets.GCS_BUCKET_NAME }}
GCS_MEDIA_FOLDER: github/${{ github.run_number }}_${{ github.run_attempt }}/
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TEST_DATASET: rumors_api_test_dataset
- name: Update coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}