mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
46 lines
837 B
YAML
46 lines
837 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GO111MODULE: on
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
go mod download
|
|
|
|
- name: Lint code
|
|
run: |
|
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
|
golangci-lint run
|
|
|
|
- name: Run tests
|
|
run: |
|
|
go test ./...
|
|
|
|
# - name: Run Gosec Security Scanner
|
|
# uses: securego/gosec@master
|
|
# with:
|
|
# args: ./...
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
docker build -t rentease .
|