Code CI #133
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
name: Code CI | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
- "LICENSE" | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "0 0 * * 4" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: ["ubuntu", "macos", "windows"] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- name: Setup Vlang | |
uses: vlang/[email protected] | |
with: | |
stable: true | |
- name: Checkout ${{ github.event.repository.name }} | |
uses: actions/checkout@v4 | |
- name: Check if code is formatted | |
run: | | |
v fmt -diff . | |
v fmt -verify . | |
- name: Run unit tests | |
run: v test . | |
- name: Build ${{ github.event.repository.name }} | |
run: | | |
v cmd/whisker -o cmd/bin/whisker | |
cmd/bin/whisker --help | |
package-vpm: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Setup Vlang | |
uses: vlang/[email protected] | |
with: | |
stable: true | |
- name: Install from VPM | |
run: | | |
v install hungrybluedev.whisker | |
package-github: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Setup Vlang | |
uses: vlang/[email protected] | |
with: | |
stable: true | |
- name: Install from GitHub | |
run: | | |
v install --git https://github.com/hungrybluedev/whisker |