Skip to content

Commit f8f0f63

Browse files
committed
Introducing elisp repo kit, a kit for repos
Signed-off-by: Psionik K <[email protected]>
0 parents  commit f8f0f63

18 files changed

+1873
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/pull_request_template.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Pull Requests
2+
3+
Generated changes to the flake.lock should be kept in a separate commit for the
4+
reviewer.
5+
6+
Keeping these changes isolated in specific commits makes it much easier to pull
7+
in your changes in parallel with other features. Maintainers may harvest your
8+
changes. We only guarantee to preserve authorship, signature, and sign-off in
9+
the git log.
10+
11+
### Creating pull requests
12+
13+
1. Fork this repository into the personal GitHub account
14+
1. Make changes on the personal fork
15+
1. Remember to sign off and sign all commits in your PR branch (instructions in readme)
16+
1. Make a Pull Request against this repository
17+
1. **Allow maintainers to make changes to your pull request** (there's a
18+
checkbox)
19+
1. Once the pull request has been approved, you will be thanked and observe your
20+
changes applied with authorshi, signature, and sign-off in the git log

.github/workflows/ci.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Copyright (C) 2022 <Positron Solutions>
2+
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
# this software and associated documentation files (the "Software"), to deal in
5+
# the Software without restriction, including without limitation the rights to
6+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
# the Software, and to permit persons to whom the Software is furnished to do so,
8+
# subject to the following conditions:
9+
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+
name: CI
21+
22+
on: # trigger this workflow on
23+
push:
24+
branches: [ $default-branch ] # pushes to the default branch
25+
pull_request:
26+
# or every pull request, from any branch to any branch
27+
28+
workflow_dispatch:
29+
# Allows you to run this workflow manually from the Actions tab
30+
31+
jobs:
32+
continuous-integration: # just a job name
33+
34+
# Run on every OS and Emacsen
35+
# Some steps specify their own logic!
36+
strategy:
37+
# Don't abort steps if any fails on any platform
38+
fail-fast: false
39+
matrix:
40+
os: [ubuntu-latest, macos-latest]
41+
emacsPkg: [ emacsNativeComp
42+
emacsUnstable
43+
# emacsGit
44+
# emacs
45+
]
46+
runs-on: ${{ matrix.os }}
47+
48+
steps:
49+
- uses: actions/[email protected]
50+
- uses: cachix/install-nix-action@v15
51+
with:
52+
extra_nix_config: |
53+
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
54+
- uses: cachix/cachix-action@v10
55+
with:
56+
name: cargo2nix-gh
57+
# This CACHIX_AUTH_TOKEN is a secret you must provide
58+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
59+
# Some paths may confuse cachix. Add them with a pipe to the pushFilter
60+
# pushFilter: "(something-else$|.drv.chroot$)"
61+
62+
# Loading the development shell with frozen versions is important to
63+
# verify that any flake commands will successfully run straight off of the
64+
# github repository.
65+
- name: load the shell with frozen versions
66+
run: nix develop .#${{ matrix.emacsPkg }} --ignore-environment --command "emacs" "--version"
67+
68+
# Linting the package is less useful on multiple version. Modify the
69+
# logic if you wish to expand lint coverage.
70+
- name: lint package
71+
if: matrix.emacsPkgs == "emacsNativeComp" && matrix.os == "ubuntu-latest"
72+
run: |
73+
nix develop \
74+
--override-input nixpkgs github:nixos/nixpkgs/release-22.05
75+
--update-input emacs-overlay \
76+
.#${{ matrix.emacsPkg }}
77+
78+
# Lint the package
79+
emacs --script ./test/elisp-repo-kit-lint.el
80+
81+
# Lint the tests
82+
emacs --script test/elisp-repo-kit-lint-tests.el
83+
84+
- name: run tests
85+
run: |
86+
# First load the shell. Updating inputs will update the view of ELPA
87+
# Emacs git, and nixpkgs.
88+
89+
# Possible RUNNER_OS values: Windows Linux MacOS
90+
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
91+
if [[ $RUNNER_OS == Linux ]]; then
92+
nix develop \
93+
--override-input nixpkgs github:nixos/nixpkgs/release-22.05
94+
--update-input emacs-overlay \
95+
.#${{ matrix.emacsPkg }}
96+
97+
else
98+
nix develop \
99+
--override-input nixpkgs github:nixos/nixpkgs/nixpkgs-22.05-darwin
100+
--update-input emacs-overlay
101+
.#${{ matrix.emacsPkg }}
102+
fi
103+
104+
# Runs the tests
105+
emacs --quick --load test/emacs-repo-kit-test-setup.el -- $GITHUB_SHA
106+
107+
# If you need terminal tests too, uncomment
108+
# emacs --script test/emacs-repo-kit-test-setup.el -- $GITHUB_SHA

.github/workflows/dco.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (C) 2022 Positron Solutions
2+
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
# this software and associated documentation files (the "Software"), to deal in
5+
# the Software without restriction, including without limitation the rights to
6+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
# the Software, and to permit persons to whom the Software is furnished to do so,
8+
# subject to the following conditions:
9+
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19+
20+
# This Developer Certificate of Origin check verifies that all commits in a PR
21+
# are signed off on by the author. It only needs to run once on each PR
22+
# update.
23+
#
24+
# The check is added as a shield to the project's README.org so that all can see
25+
# the license check for the entire commit history.
26+
27+
name: DCO Check
28+
29+
on: [pull_request]
30+
31+
jobs:
32+
check:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: tisonkun/[email protected]

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.direnv/
2+
**.elc
3+
**.el~
4+
**/*autoloads.el

COPYING

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Copyright (C) 2022 Positron Solutions
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the "Software"), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
the Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DCO

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Developer Certificate of Origin
2+
Version 1.1
3+
4+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
5+
6+
Everyone is permitted to copy and distribute verbatim copies of this
7+
license document, but changing it is not allowed.
8+
9+
10+
Developer's Certificate of Origin 1.1
11+
12+
By making a contribution to this project, I certify that:
13+
14+
(a) The contribution was created in whole or in part by me and I
15+
have the right to submit it under the open source license
16+
indicated in the file; or
17+
18+
(b) The contribution is based upon previous work that, to the best
19+
of my knowledge, is covered under an appropriate open source
20+
license and I have the right under that license to submit that
21+
work with modifications, whether created in whole or in part
22+
by me, under the same open source license (unless I am
23+
permitted to submit under a different license), as indicated
24+
in the file; or
25+
26+
(c) The contribution was provided directly to me by some other
27+
person who certified (a), (b) or (c) and I have not modified
28+
it.
29+
30+
(d) I understand and agree that this project and the contribution
31+
are public and that a record of the contribution (including all
32+
personal information I submit with it, including my sign-off) is
33+
maintained indefinitely and may be redistributed consistent with
34+
this project or the open source license(s) involved.

0 commit comments

Comments
 (0)