| name: Default |
| |
| on: [push, pull_request] |
| |
| jobs: |
| test: |
| runs-on: ubuntu-latest |
| strategy: |
| matrix: |
| go: [ 1.11, 1.12, 1.13, 1.14] |
| steps: |
| - uses: actions/checkout@v2 |
| |
| - name: Set up Go |
| uses: actions/setup-go@v2 |
| with: |
| go-version: ${{ matrix.go }} |
| |
| - name: Run go test |
| run: make test |
| |
| benchmark: |
| runs-on: ubuntu-latest |
| strategy: |
| matrix: |
| go: [ 1.11, 1.12, 1.13, 1.14] |
| steps: |
| - uses: actions/checkout@v2 |
| |
| - name: Set up Go |
| uses: actions/setup-go@v2 |
| with: |
| go-version: ${{ matrix.go }} |
| |
| - name: Run go test bench |
| run: make benchmark |
| |
| lint: |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v2 |
| |
| - name: Set up Go |
| uses: actions/setup-go@v2 |
| with: |
| go-version: 1.14 |
| |
| - name: golangci-lint |
| uses: golangci/golangci-lint-action@v1 |
| with: |
| version: v1.28 |
| |
| semantic-release: |
| needs: [test] |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v2 |
| |
| - name: Run semantic-release |
| if: github.repository == 'casbin/casbin' && github.event_name == 'push' |
| run: make release |
| env: |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |