Skip to content

Commit 62b495a

Browse files
api validate pipeline (#8)
1 parent 9e0e057 commit 62b495a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/api-validate.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Test api
2+
3+
on:
4+
push:
5+
paths:
6+
- ./backend/auth-api
7+
- .github/workflows/backend-api-validate.yml
8+
pull_request:
9+
paths:
10+
- ./back/api
11+
- .github/workflows/api-validate.yml
12+
13+
jobs:
14+
15+
test:
16+
name: Test api
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
- name: Set up Go 1.x
21+
uses: actions/setup-go@v2
22+
with:
23+
go-version: ^1.15
24+
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v2
27+
28+
- name: Configure sysctl limits
29+
run: |
30+
sudo swapoff -a
31+
sudo sysctl -w vm.swappiness=1
32+
sudo sysctl -w fs.file-max=262144
33+
sudo sysctl -w vm.max_map_count=262144
34+
35+
- name: Runs Elasticsearch
36+
uses: elastic/elastic-github-actions/elasticsearch@master
37+
with:
38+
stack-version: 7.9.3
39+
port: 30920
40+
41+
- run: go test -v ./...
42+
working-directory: ./back/api

0 commit comments

Comments
 (0)