GitHub Actions Guide
Using xc for CI with GitHub Actions
[edit]
README or README if you don’t have one yet.You can use Markdown or org-mode. This guide shows the Markdown style, but you can see an org-mode example here.
Tasks to your README with subheaders Build, Test, Deploy(or adapt to your needs)
Insert a code block under each one. Examples:
## Tasks
### Build
```sh
uv lock --check
uv build --build-constraint constraints.txt --require-hashes
```
### Test
```sh
uv run pytest
```
### Deploy
```sh
rsync dist/ ci@staging:/app/dist
```
Choose from the run-xc action, which runs a single task at a time, or the setup-xc action, which installs xc on your runner so that you can incorporate it into scripts.
Sample flow:
.github/workflows/push.yml:
name: push
on: ["push", "pull_request"]
jobs:
ci:
name: "Run CI"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: joerdav/run-xc@v1.1.0
with:
task: "build"
- uses: joerdav/run-xc@v1.1.0
with:
task: "test"
- uses: joerdav/run-xc@v1.1.0
with:
task: "deploy"
Commit your README and workflow yaml and push to GitHub. Then make a pull request and verify that your CI runs as you expect.