From 318e1b6d05cabca3ba63d54b71a32d1d173fadd6 Mon Sep 17 00:00:00 2001 From: Andrew Rioux Date: Sat, 6 May 2023 23:33:47 -0400 Subject: [PATCH] build: added GitHub docs and workflows --- .github/ISSUE_TEMPLATE/bug_report.md | 33 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 19 +++++++++++++ .github/pull_request_template.md | 27 ++++++++++++++++++ .github/workflows/build-and-test.yaml | 34 +++++++++++++++++++++++ Makefile.toml | 19 +++++++++++-- 5 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/build-and-test.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..65b2585 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us keep track of bugs +title: '' +labels: bug +assignees: r-a303931 +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Actual behavior** +A clear and concise description of what you saw happened. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - Linux distro: [e.g. centOS] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..fcf8304 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: r-a303931 +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..ce17cee --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,27 @@ +--- +name: Bug report +about: Create a report to help us keep track of bugs +title: '' +labels: +assignees: r-a303931 +--- + +# Description + +Fixes # + +# Test methedology + +Please describe the tests you ran to verify the new code + +- [ ] Test 1 +- [ ] Test 2 + +# Checklist: + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes \ No newline at end of file diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml new file mode 100644 index 0000000..d56d8e5 --- /dev/null +++ b/.github/workflows/build-and-test.yaml @@ -0,0 +1,34 @@ +# Copyright (C) 2023 Andrew Rioux +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +name: Build and test + +on: + pull_request: + branches: + - master + - development + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build and run dev container tests + uses: devcontainers/ci@v0.3 + with: + runCmd: cargo make ci diff --git a/Makefile.toml b/Makefile.toml index a09f1fa..5c09404 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -16,11 +16,11 @@ args = ["run", "build", "${@}"] command = "cargo" args = ["fmt"] -#---------------------------------- +#--------------------------------- # # Project setup tasks # -#---------------------------------- +#--------------------------------- [tasks.setup] dependencies = ["pull-rust-image", "update-submodules"] @@ -29,4 +29,17 @@ dependencies = ["pull-rust-image", "update-submodules"] shell = "docker pull rust:1-alpine" [tasks.update-submodules] -shell = "git submodule update --init" \ No newline at end of file +shell = "git submodule update --init" + +#---------------------- +# +# CI tasks +# +#---------------------- + +[tasks.ci] +dependencies = ["setup", "build"] + +[tasks.convco-check] +command = "convco" +args = ["check"] \ No newline at end of file