Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automated CI to lint and test the project #5

Merged
merged 9 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Please remove any superfluous sections before submitting the pull request! -->

### Summary

Please summarize the changes of this PR, starting with _why_ the PR is needed.

---

### PR checklist

- [ ] I have written tests that fail without my changes. _Or I did not add them on purpose._
- [ ] I have included instructions on how to test this, assuming they are not already apparent from the linked issue.

---

### Depends on

<!-- Links/references to other PRs this PR depends on -->
- [ ] Depends on #0

### Closes/Fixes/Related to

<!-- Links/references to issues this PR addresses. See https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords for more info. -->
* Fixes #0 <!-- If #0 is a bug issue -->
* Closes #0 <!-- If #0 is an enhancement issue -->
* Related to #0 <!-- List any issues which are not closed by this PR, but which this PR is related to here -->
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: ci
run-name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install Python
run: uv python install
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Lint everything
run: uvx tomlscript lint

run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install Python
run: uv python install
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Run tests
run: uvx tomlscript test
Loading