feat: new cicd
This commit is contained in:
+12
-11
@@ -1,25 +1,26 @@
|
||||
# .github/workflows/ci.yml
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
branches: [main, develop]
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
branches: [main, develop]
|
||||
workflow_call: {} # <-- makes this workflow reusable
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.21'
|
||||
|
||||
go-version: "1.21"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -32,20 +33,20 @@ jobs:
|
||||
pipewire-bin \
|
||||
wl-clipboard \
|
||||
wtype
|
||||
|
||||
|
||||
- name: Download dependencies
|
||||
run: go mod download
|
||||
|
||||
|
||||
- name: Run tests
|
||||
run: go test -v ./... -short
|
||||
|
||||
|
||||
- name: Build binary
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
run: go build -o hyprvoice ./cmd/hyprvoice
|
||||
|
||||
|
||||
- name: Test binary help
|
||||
run: ./hyprvoice --help
|
||||
|
||||
|
||||
- name: Test configure command
|
||||
run: ./hyprvoice configure --help
|
||||
|
||||
Reference in New Issue
Block a user