Skip to content

Commit

Permalink
feat: setup some CI to ensure things work
Browse files Browse the repository at this point in the history
  • Loading branch information
btkostner committed Feb 8, 2024
1 parent 66e410b commit 4f3f8b2
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions .chezmoiexternal.toml.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{- $miseLatest := (gitHubLatestRelease "jdx/mise").TagName -}}
{{- $miseOsNameDict := dict "linux" "linux" "darwin" "macos" "windows" "INVALID_OS" -}}
{{- $miseOsName := (get $miseOsNameDict .chezmoi.os) -}}
{{- $miseOsArchDict := dict "amd64" "x64" "arm64" "arm64" -}}
{{- $miseOsArch := (get $miseOsArchDict .chezmoi.arch) -}}

{{- $zoxideLatest := (gitHubLatestRelease "ajeetdsouza/zoxide").Name -}}
{{- $zoxideOsArchDict := dict "amd64" "x86_64" "arm64" "aarch64" -}}
{{- $zoxideOsArch := (get $zoxideOsArchDict .chezmoi.arch) -}}
{{- $zoxideOsNameDict := dict "linux" "unknown-linux-musl" "darwin" "apple-darwin" "windows" "pc-windows-msvc" -}}
{{- $zoxideOsName := (get $zoxideOsNameDict .chezmoi.os) -}}

{{- $nvimLatest := (gitHubLatestRelease "AstroNvim/AstroNvim").TagName -}}

{{- $nerdFontsLatest := (gitHubLatestRelease "ryanoasis/nerd-fonts").TagName -}}
{{- $fontPathDict := dict "linux" ".fonts" "darwin" "Library/Fonts" "windows" "AppData/Local/Microsoft/Windows/Fonts" -}}
{{- $fontDir := osClean (get $fontPathDict .chezmoi.os) -}}

[".local/bin/mise"]
type = "archive-file"
url = "https://github.com/jdx/mise/releases/download/{{ $miseLatest }}/mise-{{ $miseLatest }}-{{ $miseOsName }}-{{ $miseOsArch }}.tar.gz"
path = "mise/bin/mise"
executable = true
refreshPeriod = "168h"

[".local/bin/zoxide"]
type = "archive-file"
url = "https://github.com/ajeetdsouza/zoxide/releases/download/v{{ $zoxideLatest }}/zoxide-{{ $zoxideLatest }}-{{ $zoxideOsArch }}-{{ $zoxideOsName }}.tar.gz"
path = "zoxide"
executable = true
refreshPeriod = "168h"

[".config/nvim"]
type = "archive"
url = "https://github.com/AstroNvim/AstroNvim/archive/refs/tags/{{ $nvimLatest }}.tar.gz"
refreshPeriod = "168h"

["{{ $fontDir }}/FiraCode"]
type = "archive"
url = "https://github.com/ryanoasis/nerd-fonts/releases/download/{{ $nerdFontsLatest }}/FiraCode.zip"
refreshPeriod = "168h"
3 changes: 3 additions & 0 deletions .chezmoiignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
LICENSE
README.MD
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- main
workflow_call:
workflow_dispatch:

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
Linux:
runs-on: ubuntu-latest

steps:
- name: Install (Chezmoi)
run: sh -c "$(curl -fsLS get.chezmoi.io)"

- name: Checkout
uses: actions/checkout@v4

- name: Apply
run: chezmoi apply .

macOS:
runs-on: macos-latest

steps:
- name: Install (Chezmoi)
run: sh -c "$(curl -fsLS get.chezmoi.io)"

- name: Checkout
uses: actions/checkout@v4

- name: Apply
run: chezmoi apply .
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Alexandre Giard

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.
7 changes: 7 additions & 0 deletions dot_editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

0 comments on commit 4f3f8b2

Please sign in to comment.