mirror of
https://github.com/cheikh2shift/godex.git
synced 2026-10-22 02:53:24 -05:00
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: CI
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Install X11 dev library
|
|
run: sudo apt-get update && sudo apt-get install -y libx11-dev
|
|
|
|
- name: Run unit tests
|
|
run: go test -short ./...
|
|
|
|
- name: Run tests with race detection
|
|
run: go test -short -race ./...
|
|
|
|
integration-tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Install X11 dev library
|
|
run: sudo apt-get update && sudo apt-get install -y libx11-dev
|
|
|
|
- name: Run integration tests
|
|
run: go test -v -short=false ./... -run "Integration" -timeout=10m
|