Skip to content

Commit

Permalink
Merge pull request #27 from closetool/master
Browse files Browse the repository at this point in the history
fix: add github action and semantic release
  • Loading branch information
hsluoyz authored Apr 18, 2021
2 parents 83dd5d7 + e0ea472 commit e226492
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 15 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14

- uses: actions/checkout@v2
- name: Run Unit tests
run: go test -v ./...
env:
PG_CONN: postgresql://postgres:[email protected]:5432/postgres?sslmode=disable

semantic-release:
needs: [test]
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
- name: Run semantic-release
uses: go-semantic-release/action@v1
if: github.repository == 'casbin/casbin-pg-adapter' && github.event_name == 'push'
with:
github-token: ${{ secrets.GH_TOKEN }}
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Go-pg Adapter

[![Build Status](https://travis-ci.com/casbin/casbin-pg-adapter.svg?branch=master)](https://travis-ci.com/casbin/casbin-pg-adapter)
[![Coverage Status](https://coveralls.io/repos/github/casbin/casbin-pg-adapter/badge.svg?branch=master)](https://coveralls.io/github/casbin/casbin-pg-adapter?branch=master)
[![Go](https://github.com/casbin/casbin-pg-adapter/actions/workflows/ci.yml/badge.svg)](https://github.com/casbin/casbin-pg-adapter/actions/workflows/ci.yml)

Go-pg Adapter is the [Go-pg](https://github.com/go-pg/pg) adapter for [Casbin](https://github.com/casbin/casbin). With this library, Casbin can load policy from PostgreSQL or save policy to it.

Expand Down

0 comments on commit e226492

Please sign in to comment.