2020-03-21 20:53:50 +01:00
|
|
|
name: Integration
|
|
|
|
|
2021-02-18 09:07:47 +01:00
|
|
|
on:
|
|
|
|
push:
|
2022-02-25 09:43:31 +01:00
|
|
|
branches:
|
|
|
|
- main
|
2022-10-22 14:35:56 +02:00
|
|
|
pull_request:
|
2020-03-21 20:53:50 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
2022-10-22 14:35:56 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2020-03-21 20:53:50 +01:00
|
|
|
steps:
|
2023-09-08 09:32:00 +02:00
|
|
|
- uses: actions/checkout@v4
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Setup go
|
2023-12-08 09:07:42 +01:00
|
|
|
uses: actions/setup-go@v5
|
2020-03-21 20:53:50 +01:00
|
|
|
with:
|
2022-10-22 14:35:56 +02:00
|
|
|
go-version: "1.17.x"
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2022-02-26 10:56:51 +01:00
|
|
|
- name: Cache Go Dependencies
|
2022-03-25 09:02:11 +01:00
|
|
|
uses: actions/cache@v3
|
2022-02-26 10:56:51 +01:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Vet
|
2021-09-14 11:37:38 +02:00
|
|
|
run: go vet
|
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Test
|
2021-09-14 11:37:38 +02:00
|
|
|
run: go test ./...
|
2020-03-21 20:53:50 +01:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build
|
2022-10-22 14:35:56 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2021-09-14 11:37:38 +02:00
|
|
|
needs:
|
|
|
|
- test
|
2020-03-21 20:53:50 +01:00
|
|
|
steps:
|
2023-09-08 09:32:00 +02:00
|
|
|
- uses: actions/checkout@v4
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Setup go
|
2023-12-08 09:07:42 +01:00
|
|
|
uses: actions/setup-go@v5
|
2020-03-21 20:53:50 +01:00
|
|
|
with:
|
2022-10-22 14:35:56 +02:00
|
|
|
go-version: "1.17.x"
|
2021-09-14 11:37:38 +02:00
|
|
|
|
2022-02-26 10:56:51 +01:00
|
|
|
- name: Cache Go Dependencies
|
2022-03-25 09:02:11 +01:00
|
|
|
uses: actions/cache@v3
|
2022-02-26 10:56:51 +01:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/go-build
|
|
|
|
~/go/pkg/mod
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-go-
|
|
|
|
|
2020-03-21 20:53:50 +01:00
|
|
|
- name: Build
|
2021-09-14 11:37:38 +02:00
|
|
|
run: go build ./...
|
2020-03-21 20:53:50 +01:00
|
|
|
|
|
|
|
- name: Docker
|
2021-09-14 11:37:38 +02:00
|
|
|
run: docker build .
|
2022-10-22 14:35:56 +02:00
|
|
|
|
|
|
|
automerge:
|
|
|
|
name: Merge Automatically
|
|
|
|
needs: [test, build]
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Obtain Access Token
|
|
|
|
id: acces_token
|
|
|
|
run: |
|
|
|
|
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.SYSTEMLI_APP_CREDENTIALS_TOKEN }})"
|
|
|
|
echo "token=$TOKEN" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- name: Merge
|
|
|
|
uses: fastify/github-action-merge-dependabot@v3
|
|
|
|
with:
|
|
|
|
github-token: ${{ steps.acces_token.outputs.token }}
|