Skip to content

Package CI Template

Use this GitHub Actions workflow in your Wyn package repository.

.github/workflows/ci.yml

yaml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Wyn
        run: curl -fsSL https://wynlang.com/install.sh | sh

      - name: Check
        run: |
          export PATH="$HOME/.wyn/bin:$PATH"
          for f in src/*.wyn; do
            wyn check "$f" || exit 1
          done

      - name: Test
        run: |
          export PATH="$HOME/.wyn/bin:$PATH"
          for f in tests/*.wyn; do
            [ -f "$f" ] || continue
            wyn run "$f" || exit 1
          done

      - name: Format check
        run: |
          export PATH="$HOME/.wyn/bin:$PATH"
          wyn fmt src/ --check

Usage

  1. Copy the workflow file to your package repo
  2. Ensure your package has src/ and tests/ directories
  3. Push to GitHub — CI runs automatically

Package Structure

my-package/
├── wyn.toml
├── src/
│   └── lib.wyn
├── tests/
│   └── test_lib.wyn
└── .github/
    └── workflows/
        └── ci.yml

See Also

MIT License