Skip to content

Commit

Permalink
Merge github-actions into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-sidelnikov authored Jun 6, 2024
2 parents 3bd095d + 2e932fd commit 1f2a349
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: run tests

on:
pull_request:
types:
- labeled

jobs:
acc_tests:
name: acceptance tests
runs-on: ubuntu-22.04
environment: tests
if: ${{ contains(fromJSON('["post", "gate"]'), github.event.label.name) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- run: make acceptance
env:
OS_AUTH_URL: ${{ secrets.AUTH_URL }}
OS_DOMAIN_NAME: ${{ secrets.USER_DOMAIN_NAME }}
OS_PASSWORD: ${{ secrets.PASSWORD }}
OS_USERNAME: ${{ secrets.USERNAME }}
OS_PROJECT_NAME: ${{ vars.FUNCTEST_PROJECT_NAME }}
OS_REGION: "eu-de"
merge:
runs-on: ubuntu-latest
name: merge branch into devel
environment: github
needs:
- acc_tests
if: ${{ github.event.label.name == 'gate' && success() }}
steps:
- uses: actions/checkout@v4
- uses: kattecon/gh-app-access-token-gen@v1
id: gen_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_KEY }}
- uses: devmasx/merge-branch@master
with:
label_name: 'gate'
target_branch: 'devel'
github_token: ${{ steps.gen_token.outputs.token }}
41 changes: 41 additions & 0 deletions .github/workflows/otc-golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: check code quality

on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled

jobs:
lint:
name: run golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.53.3
vet:
name: run go vet
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- run: make vet
unit_tests:
name: run unit tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.20"
- run: make test
File renamed without changes.

0 comments on commit 1f2a349

Please sign in to comment.