commit 238479e72ebdcce20f2b6c10d6d0f4b58fbbc2eb Author: treeform Date: Thu Nov 19 18:41:32 2020 -0800 Initial commit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9427716 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Run tests +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + + - name: Cache choosenim + id: cache-choosenim + uses: actions/cache@v1 + with: + path: ~/.choosenim + key: ${{ runner.os }}-choosenim-stable + + - name: Cache nimble + id: cache-nimble + uses: actions/cache@v1 + with: + path: ~/.nimble + key: ${{ runner.os }}-nimble-stable + + - uses: jiro4989/setup-nim-action@v1 + + - run: nimble test -y diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9e74f1c --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# ignore files with no extention: +* +!*/ +!*.* + +# normal ignores: +*.exe +nimcache +*.pdb +*.ilk +.* diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9c7299a --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2020 Author + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..0b5f5ee --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# You can use this nim template to jump start your nim library or project. + +This template includes: +* MIT licence +* src directory and a private common.nim +* test directory +* GitHub Actions to run the tests on GitHub diff --git a/examples/example.nim b/examples/example.nim new file mode 100644 index 0000000..0262224 --- /dev/null +++ b/examples/example.nim @@ -0,0 +1 @@ +## Include an example on how to use your library diff --git a/nimtemplate.nimble b/nimtemplate.nimble new file mode 100644 index 0000000..bd72628 --- /dev/null +++ b/nimtemplate.nimble @@ -0,0 +1,8 @@ +version = "0.0.0" +author = "Your name" +description = "Description of your library" +license = "MIT" + +srcDir = "src" + +requires "nim >= 1.2.2" diff --git a/src/nimtemplate.nim b/src/nimtemplate.nim new file mode 100644 index 0000000..5fcd576 --- /dev/null +++ b/src/nimtemplate.nim @@ -0,0 +1,3 @@ +## Public interface to you library. + +import nimtemplate/common diff --git a/src/nimtemplate/common.nim b/src/nimtemplate/common.nim new file mode 100644 index 0000000..869f4b5 --- /dev/null +++ b/src/nimtemplate/common.nim @@ -0,0 +1 @@ +## Add private variables or functions here that you don't want to export. diff --git a/tests/config.nims b/tests/config.nims new file mode 100644 index 0000000..a119208 --- /dev/null +++ b/tests/config.nims @@ -0,0 +1 @@ +--path:"../src" diff --git a/tests/test.nim b/tests/test.nim new file mode 100644 index 0000000..41fa755 --- /dev/null +++ b/tests/test.nim @@ -0,0 +1,3 @@ +## Put your tests here. + +import nimtemplate