From 5d1ee8ba8bccbe48b8f6a83397288fe305fa5032 Mon Sep 17 00:00:00 2001 From: Liam Mulhall Date: Tue, 25 Jun 2024 19:34:19 -0700 Subject: [PATCH] Set up continuous integration --- .github/workflows/check.yml | 31 ++++++++++++++++++++++++++++ LICENSE.md | 2 +- README.md | 2 +- doc/README.md | 40 ++++++++++++++++++------------------- doc/explanation.md | 2 +- doc/howto.md | 2 +- doc/tutorial.md | 2 +- tasks.py | 2 ++ 8 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..8fdb2af --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,31 @@ +name: continuous integration +on: [push, pull_request] +env: + HCI_ROOT_DIR: "." +permissions: + contents: read +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go 1.22 + uses: actions/setup-go@v5 + with: + go-version: "1.22.x" + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: install Pipenv + run: pip install pipenv --user + - name: install dependencies + run: pipenv sync --dev # Installs all deps, including dev deps, from Pipfile.lock. + - name: format + run: pipenv run invoke fmt + - name: lint + run: pipenv run invoke lint + - name: check types + run: pipenv run invoke build + - name: run tests + run: pipenv run invoke test diff --git a/LICENSE.md b/LICENSE.md index db83ee1..73dcdd1 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -15,4 +15,4 @@ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PA PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 2cae6bd..88e02e9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Human Leukocyte Antigen (HLA) Curation Interface The HCI is under development. See our [roadmap](https://github.com/ClinGen/stanford-hci/issues/1) -and our [docs](./doc). \ No newline at end of file +and our [docs](./doc). diff --git a/doc/README.md b/doc/README.md index ffd7672..d41a15b 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,26 +1,26 @@ # Documentation - [Tutorials](./tutorial.md) (learning-oriented) - - Tutorials are lessons that take the reader by the hand through a series of - steps to complete a project of some kind. Unlike how-to guides, tutorials - don't assume lots of prerequisite knowledge. + - Tutorials are lessons that take the reader by the hand through a series of + steps to complete a project of some kind. Unlike how-to guides, tutorials + don't assume lots of prerequisite knowledge. - [How-to guides](./howto.md) (problem-oriented) - - How-to guides take the reader through the steps required to solve a - real-world problem. They are recipes, directions to achieve a specific end. - Unlike tutorials, they typically assume a fair amount of prerequisite - knowledge. + - How-to guides take the reader through the steps required to solve a + real-world problem. They are recipes, directions to achieve a specific end. + Unlike tutorials, they typically assume a fair amount of prerequisite + knowledge. - [Explanations](./explanation.md) (understanding-oriented) - - Explanation, or discussions, clarify and illuminate a particular topic. They - broaden the documentation’s coverage of a topic. Explanations can equally - well be described as discussions; they are discursive in nature. They are a - chance for the documentation to relax and step back from the software, - taking a wider view, illuminating it from a higher level or even from - different perspectives. You might imagine a discussion document being read - at leisure, rather than over the code. + - Explanation, or discussions, clarify and illuminate a particular topic. They + broaden the documentation’s coverage of a topic. Explanations can equally + well be described as discussions; they are discursive in nature. They are a + chance for the documentation to relax and step back from the software, + taking a wider view, illuminating it from a higher level or even from + different perspectives. You might imagine a discussion document being read + at leisure, rather than over the code. - Reference guides (information-oriented) - - Reference guides are technical descriptions of the machinery and how to - operate it. Reference guides have one job only: to describe. They are - code-determined, because ultimately that’s what they describe: key classes, - functions, APIs, and so they should list things like functions, fields, - attributes and methods, and set out how to use them. For this project, - reference is code comments (Go doc comments). \ No newline at end of file + - Reference guides are technical descriptions of the machinery and how to + operate it. Reference guides have one job only: to describe. They are + code-determined, because ultimately that’s what they describe: key classes, + functions, APIs, and so they should list things like functions, fields, + attributes and methods, and set out how to use them. For this project, + reference is code comments (Go doc comments). diff --git a/doc/explanation.md b/doc/explanation.md index 60e0836..0037f49 100644 --- a/doc/explanation.md +++ b/doc/explanation.md @@ -1 +1 @@ -# Explanations \ No newline at end of file +# Explanations diff --git a/doc/howto.md b/doc/howto.md index 562aa75..08663ec 100644 --- a/doc/howto.md +++ b/doc/howto.md @@ -1 +1 @@ -# How-to guides \ No newline at end of file +# How-to guides diff --git a/doc/tutorial.md b/doc/tutorial.md index de8ecfe..81c8590 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1 +1 @@ -# Tutorials \ No newline at end of file +# Tutorials diff --git a/tasks.py b/tasks.py index 7f1eb05..b856502 100644 --- a/tasks.py +++ b/tasks.py @@ -37,6 +37,8 @@ def fmt(c): """Format code.""" c.run("go fmt ./...") c.run("black tasks.py") + c.run("yamlfmt ./.github/**/*") + c.run("mdformat .") @task