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/ --checkUsage
- Copy the workflow file to your package repo
- Ensure your package has
src/andtests/directories - Push to GitHub — CI runs automatically
Package Structure
my-package/
├── wyn.toml
├── src/
│ └── lib.wyn
├── tests/
│ └── test_lib.wyn
└── .github/
└── workflows/
└── ci.ymlSee Also
- Creating Packages — package structure
- CLI Commands —
wyn testfor CI