Files
go-telegram-bot/.github/workflows/go-ci.yaml
HugeFrog24 c8af457af1 MVP
md formatting doesnt work yet

Started implementing owner feature

Add .gitattributes to enforce LF line endings

Temporary commit before merge

Updated owner management

Updated json and gitignore

Proceed with role management

Again, CI

Fix some lint errors

Implemented screening

Per-bot API keys implemented

Use getRoleByName func

Fix unused imports

Upgrade actions

rm unused function

Upgrade action

Fix unaddressed errors
2024-10-23 22:06:55 +02:00

55 lines
1.2 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
# Set up Go environment
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23' # Specify the Go version you are using
# Cache Go modules
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# Install Dependencies
- name: Install Dependencies
run: go mod tidy
# Run Linters using golangci-lint
- name: Lint Code
uses: golangci/golangci-lint-action@v6
with:
version: v1.60 # Specify the version of golangci-lint
args: --timeout 5m
# Run Tests
- name: Run Tests
run: go test ./... -v
# Security Analysis using gosec
- name: Security Scan
uses: securego/gosec@master
with:
args: ./...