Add CI workflow #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2024 Serpent OS Developers | |
# SPDX-License-Identifier: CC0-1.0 | |
name: CI | |
on: [push, pull_request, 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: | | |
test -z $(gofmt -l -s .) && exit 0 || gofmt -d -s .; exit 1 | |
- name: Build project | |
run: | | |
task build | |
build/libstone --version | |
- name: Run tests | |
run: | | |
task check |