Skip to content

refactor examples

refactor examples #5

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
paths:
- "**.md"
- ".github/workflows/**"
push:
branches:
- main
paths:
- "**.md"
- ".github/workflows/**"
jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "14"
- name: Prettier check
run: |
# if you encounter error, rerun the command below and commit the changes
make lint
git diff --exit-code
examples:
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
- name: Run examples(Unix)
if: matrix.os != 'windows-latest'
working-directory: examples
run: zig build run-all
- name: Run examples(Windows)
if: matrix.os == 'windows-latest'
working-directory: examples
run: zig.exe build run-all