Skip to content

Commit

Permalink
Merge pull request #2 from serpent-os/add-ci-workflow
Browse files Browse the repository at this point in the history
Add CI workflow
  • Loading branch information
der-eismann authored Feb 22, 2024
2 parents fe8aacd + 9c632a6 commit ff6f83f
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2024 Serpent OS Developers
# SPDX-License-Identifier: CC0-1.0

* @der-eismann @GZGavinZhao @livingsilver94 @silkeh
14 changes: 11 additions & 3 deletions .github/workflows/REUSE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@

name: REUSE Compliance Check

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]

jobs:
test:
check_compliance:
runs-on: ubuntu-latest
name: Run check

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# SPDX-FileCopyrightText: 2024 Serpent OS Developers
# SPDX-License-Identifier: CC0-1.0

name: Golang CI

on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
name: Build & Test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Check formatting
run: |
task check_formatting
- name: Build project
run: |
task build
build/libstone --version
- name: Run tests
run: |
task check
8 changes: 8 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ tasks:
clean:
cmds:
- rm -rf {{.OUTPATH}}

fmt:
cmds:
- gofmt -s -w .

check_formatting:
cmds:
- test -z $(gofmt -l -s .) && exit 0 || gofmt -d -s .; exit 1

0 comments on commit ff6f83f

Please sign in to comment.