-
-
Notifications
You must be signed in to change notification settings - Fork 17
47 lines (39 loc) · 1.11 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:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Set up Docker
uses: docker-practice/actions-setup-docker@master
- name: Set up Server
run: |
set -x
docker version
docker run -id -p 50051:50051 \
-e CONNECTION_CONFIG_PATH=/config/connection_config.json \
-v $GITHUB_WORKSPACE/config:/config \
-v $GITHUB_WORKSPACE/examples:/data/examples \
--name my-casbin-server-config \
-d casbin/casbin-server
- name: Go Test
run: go test ./...
semantic-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run semantic-release
if: github.repository == 'casbin/casbin-go-client' && github.event_name == 'push'
run: |
export PATH="$(yarn global bin):$PATH"
yarn global add semantic-release
semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}