mirror of
https://github.com/Luzifer/ots.git
synced 2026-01-04 09:35:45 -05:00
ci: add forgejo pr-tests
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
e7e4c1fa10
commit
dd7ae4570b
1 changed files with 47 additions and 0 deletions
47
.forgejo/workflows/pr-test.yaml
Normal file
47
.forgejo/workflows/pr-test.yaml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: pr-test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
test-and-build:
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
runs-on: forgejo
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
|
||||
- name: Marking workdir safe
|
||||
run: git config --global --add safe.directory /__w/ots/ots
|
||||
|
||||
- name: 'Lint and test code: API'
|
||||
run: |
|
||||
go test -cover -v ./...
|
||||
golangci-lint run ./...
|
||||
|
||||
- name: 'Lint and test code: Client'
|
||||
working-directory: ./pkg/client
|
||||
run: |
|
||||
go test -cover -v ./...
|
||||
golangci-lint run ./...
|
||||
|
||||
- name: 'Lint and test code: OTS-CLI'
|
||||
working-directory: ./cmd/ots-cli
|
||||
run: |
|
||||
go test -cover -v ./...
|
||||
golangci-lint run ./...
|
||||
|
||||
- name: Generate (and validate) translations
|
||||
run: make translate
|
||||
|
||||
- name: Do a quick local build
|
||||
run: make build-local
|
||||
|
||||
- name: Execute Trivy scan
|
||||
run: make trivy
|
||||
Loading…
Add table
Add a link
Reference in a new issue