Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
der-eismann committed Feb 20, 2024
1 parent a97afc1 commit 70c0103
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 3 deletions.
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: Check REUSE compliance

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

- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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: 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 70c0103

Please sign in to comment.