Skip to content

Commit

Permalink
Add automated CI to lint and test the project (#5) (Closes: #4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt-Brunner authored Nov 25, 2024
1 parent a16fe72 commit 42b41f7
Show file tree
Hide file tree
Showing 6 changed files with 536 additions and 7 deletions.
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

0 comments on commit 42b41f7

Please sign in to comment.