-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.85 KB
/
pull_request.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
50
51
52
53
54
name: CI/CD
on:
pull_request:
types: [
opened,
synchronize,
reopened,
]
jobs:
build:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Clone the repo
uses: actions/checkout@v2
- name: Build the Docker image
run: |
make build
echo "DEBUNKBOT_CACHE_TTL=60" >> .env
echo "DEBUNKBOT_TEST_GSHEET_SHEET_ID=${{ secrets.DEBUNKBOT_TEST_GSHEET_SHEET_ID }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_SHEET_WORKSHEETS=${{ secrets.DEBUNKBOT_TEST_GSHEET_SHEET_WORKSHEETS }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_FIRST_APPEARANCE=${{ secrets.DEBUNKBOT_TEST_GSHEET_FIRST_APPEARANCE }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_APPEARANCES=${{ secrets.DEBUNKBOT_TEST_GSHEET_APPEARANCES }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_RATING_COLUMN=${{ secrets.DEBUNKBOT_TEST_GSHEET_RATING_COLUMN }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_RATINGS=${{ secrets.DEBUNKBOT_TEST_GSHEET_RATINGS }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_CLAIM_DESCRIPTION=${{ secrets.DEBUNKBOT_TEST_GSHEET_CLAIM_DESCRIPTION }}" >> .env
echo "DEBUNKBOT_TEST_GSHEET_DEBUNK_URL=${{ secrets.DEBUNKBOT_TEST_GSHEET_DEBUNK_URL }}" >> .env
echo "DEBUNKBOT_SENTRY_DSN=${{ secrets.DEBUNKBOT_SENTRY_DSN }}" >> .env
- name: Create credentials.json
uses: RollyPeres/base64-to-path@v1
with:
filePath: ${{ github.workspace }}/debunkbot/test/credentials.json
encodedString: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- name: Start app
run: make run
- name: Lint
run: make lint
- name: Test
run: make test
- name: Stop app
run: make stop