-
Notifications
You must be signed in to change notification settings - Fork 295
68 lines (65 loc) · 1.88 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Test
# yamllint disable-line rule:truthy
on: [pull_request]
jobs:
go:
name: Go Test
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
memcached:
image: memcached
ports:
- 11211:11211
env:
MEMCACHED: localhost:11211
REDIS_URL: "redis://localhost:6379/0"
steps:
- name: Set up Go
uses: actions/setup-go@v3
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Go Test
run: |
for i in {1..5}; do if ! echo stats | nc -w 1 localhost 11211 >/dev/null; then echo 'Waiting for memcached' && sleep 1; fi; done
go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v
- name: codecov upload
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
node:
name: Website Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: yarn install
run: cd website && yarn install
- name: yarn lint
run: cd website && yarn run lint
- uses: cypress-io/github-action@v5
with:
start: yarn start
wait-on: "http://localhost:3000"
working-directory: website
browser: chrome
record: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dependabot-merge:
name: "Dependabot automerge"
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
needs: [ "node", "go"]
if: github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'
steps:
- uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
target: 'minor'