-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (41 loc) · 1.18 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
name: ci
on: [push, pull_request]
env:
go-version: '1.17.x'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Install Redis
uses: zhulik/[email protected]
with:
redis version: '5'
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.go-version }}
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 5.0.8
mongodb-username: admin
mongodb-password: admin
mongodb-db: weni-web-chat
- name: Lint gofmt
run: gofmt -d .
- name: Run tests
env:
WWC_S3_ACCESS_KEY: ${{ secrets.WWC_S3_ACCESS_KEY }}
WWC_S3_SECRET_KEY: ${{ secrets.WWC_S3_SECRET_KEY }}
WWC_S3_ENDPOINT: ${{ secrets.WWC_S3_ENDPOINT }}
WWC_S3_REGION: ${{ secrets.WWC_S3_REGION }}
WWC_S3_BUCKET: ${{ secrets.WWC_S3_BUCKET }}
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false