Skip to content

Commit

Permalink
Clean up GitHub Action templates (#53)
Browse files Browse the repository at this point in the history
* Clean up GitHub Action templates

* Fix typo

* Clean up changelog links
  • Loading branch information
nnichols authored Oct 8, 2024
1 parent 8e6b343 commit a463a8f
Show file tree
Hide file tree
Showing 18 changed files with 248 additions and 148 deletions.
38 changes: 24 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ That said, it is important to track the history of changes made to our CI/CD and
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [2024 October 08](#2024-october-08)
- [2024 October 07](#2024-october-07)
- [2024 October 02](#2024-october-02)
- [2024 September 30](#2024-september-30)
Expand All @@ -25,16 +26,25 @@ That said, it is important to track the history of changes made to our CI/CD and
- [2024 January 27](#2024-january-27)
- [2023 June 1](#2023-june-1)
- [2023 May 25](#2023-may-25)
- [2023 Apr 18](#2023-apr-18)
- [2023 Apr 01](#2023-apr-01)
- [2023 Mar 27](#2023-mar-27)
- [2022 Dec 13](#2022-dec-13)
- [2022 Dec 12](#2022-dec-12)
- [2022 Dec 08](#2022-dec-08)
- [2022 Dec 06](#2022-dec-06)
- [2023 April 18](#2023-april-18)
- [2023 April 01](#2023-april-01)
- [2023 March 27](#2023-march-27)
- [2022 December 13](#2022-december-13)
- [2022 December 12](#2022-december-12)
- [2022 December 08](#2022-december-08)
- [2022 December 06](#2022-december-06)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## 2024 October 08

* Consistently format all GitHub Actions workflows
* Add an `id` to all steps in GitHub Actions workflows
* Add a `name` to all steps in GitHub Actions workflows
* Add inline comments to GitHub Actions
* Fix the formatting of the `cljstyle` config
* Suppress `clj-kondo` warnings for `clojure.core/*clojure-version*`

## 2024 October 07

* Update Renovate config to ignore GitHub Actions, since they are managed by this repository
Expand Down Expand Up @@ -126,29 +136,29 @@ That said, it is important to track the history of changes made to our CI/CD and
* Bump `clj-holmes-action` to 53daa4da4ff495cccf791e4ba4222a8317ddae9e
* Force Leiningen to keep POM files up-to-date

## 2023 Apr 18
## 2023 April 18

* Bump `actions/checkout` to `3.5.2`

## 2023 Apr 01
## 2023 April 01

* Bump `nnichols/clojure-dependency-update-action` to `v5`

## 2023 Mar 27
## 2023 March 27

* Bump `actions/checkout` to `3.5.0`
* Bump `actions/checkout` to `3.3.0`

## 2022 Dec 13
## 2022 December 13

* Add NPM files to .gitignore, since it's used for CLJS test suites
* auto-run sync on merge to master

## 2022 Dec 12
## 2022 December 12

* Bump `actions/checkout` from `3.1.0` to `3.2.0`

## 2022 Dec 08
## 2022 December 08

* Configure .gitignore as a rebroadcastable target
* Configure common Pull Request Label targets as rebroadcastable targets
Expand All @@ -158,7 +168,7 @@ That said, it is important to track the history of changes made to our CI/CD and
* Add template for Contribution Guidelines to embed repository-specific links
* Add template for MIT License to embed the repository year

## 2022 Dec 06
## 2022 December 06

* Configure all common clojure Github Actions as rebroadcastable targets
* Configure static documentation templates as rebroadcastable targets
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-2024 Wall Brew Co
Copyright (c) 2022-2024 Wall Brew Co.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions sources/clojure/.cljstyle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{:files {:extensions #{"clj" "cljs" "cljc" "cljx" "edn"}
:ignore #{"target" ".git" ".idea" ".vscode" "node_modules" ".clj-kondo" ".calva" ".lsp"}}
:rules {:namespaces {:enabled? false}
:indentation {:indents {#"defspec" [[:inner 0]]
#"defstate" [[:inner 0]]
#"for-all" [[:inner 0]]}}}}
:indentation {:indents {#"defspec" [[:inner 0]]
#"defstate" [[:inner 0]]
#"for-all" [[:inner 0]]}}}}
3 changes: 2 additions & 1 deletion sources/clojure/cljkondo/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
:refer-all {:exclude #{clojure.test}}
:shadowed-var {:level :warning}
:single-key-in {:level :warning}
:unresolved-symbol {:exclude [(clojure.test/is [match?])
:unresolved-symbol {:exclude [clojure.core/*clojure-version*
(clojure.test/is [match?])
clojure.test.check.clojure-test/defspec]}
:unsorted-required-namespaces {:level :warning}
:used-underscored-binding {:level :warning}
Expand Down
19 changes: 14 additions & 5 deletions sources/github-actions/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,21 @@ Quickly describe your change and the rationale behind it.
Please link to any relevant issues or discussions.

- Additions:
- Updates:
- Deletions:
- { change }
- Changes:
- { change }
- Deprecations:
- { change }
- Removals:
- { change }
- Fixes:
- { change }
- Security:
- { change }

## Pre-merge Checklist

- [ ] Read and agree to the Contribution Guidelines and Code of Conduct
- [ ] Write new tests for the changed functionality
- [ ] Update CHANGELOG and increment version
- [ ] Update README and relevant documentation
- [ ] Write new tests for impacted functionality
- [ ] Update the CHANGELOG and increment version
- [ ] Update the README and other relevant documentation
16 changes: 12 additions & 4 deletions sources/github-actions/workflows/cljdoc_test.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
# Verifies that the project is compatible with cljdoc, and that our documentation will render correctly.
name: Check cljdoc compatibility

on: ["pull_request", "workflow_dispatch"]

jobs:
check-cljdoc:

# Cancel any runs in progress for the same workflow and PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.1
- name: Checkout Repository
id: checkout
uses: actions/checkout@v4.2.1

- name: Cache maven dependencies
- name: Cache Maven Dependencies
id: cache-maven
uses: actions/cache@v4
env:
cache-name: cache-maven
with:
path: ~/.m2
save-always: true
key: ${{ runner.os }}-clj-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-clj
- name: Package the library as a jar
- name: Package The Library As A Jar
id: package
run: lein jar

- name: cljdoc Check
id: cljdoc-check
uses: cljdoc/cljdoc-check-action@v0.0.3

# This file was automatically copied and populated by rebroadcast
Expand Down
29 changes: 17 additions & 12 deletions sources/github-actions/workflows/clojure.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
# Execute Clojure tests using Leiningen
name: Clojure Tests

on: ["workflow_dispatch", "pull_request"]

jobs:
test:

# Cancel any runs in progress for the same workflow and PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4.2.1

- name: Cache maven dependencies
uses: actions/cache@v4
env:
- name: Checkout Repository
id: checkout
uses: actions/checkout@v4.2.1

- name: Cache Maven Dependencies
id: cache-maven
uses: actions/cache@v4
env:
cache-name: cache-maven
with:
with:
path: ~/.m2
save-always: true
key: ${{ runner.os }}-clj-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-clj
- name: Install Clojure dependencies
run: lein deps
- name: Install Clojure Dependencies
id: install-deps
run: lein deps

- name: Run all tests
run: lein test
- name: Run All Tests
id: run-tests
run: lein test

# This file was automatically copied and populated by rebroadcast
# Do not edit this file directly, instead modify the source at https://github.com/Wall-Brew-Co/rebroadcast/blob/master/sources/github-actions/workflows/clojure.yml
73 changes: 40 additions & 33 deletions sources/github-actions/workflows/clojurescript.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
# Executes ClojureScript tests using Leiningen / Karma
name: Clojurescript Tests

on: ["workflow_dispatch", "pull_request"]

jobs:
test:

# Cancel any runs in progress for the same workflow and PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4.2.1

- name: Cache maven dependencies
uses: actions/cache@v4
env:
- name: Checkout Repository
id: checkout
uses: actions/checkout@v4.2.1

- name: Cache Maven Dependencies
id: cache-maven
uses: actions/cache@v4
env:
cache-name: cache-maven
with:
with:
path: ~/.m2
save-always: true
key: ${{ runner.os }}-${{ env.cache-name }}-clj-${{ hashFiles('**/project.clj') }}
key: ${{ runner.os }}-clj-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-clj
- name: Cache npm dependencies
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-npm
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-clj
- name: Cache npm dependencies
uses: actions/cache@v4
env:
cache-name: cache-npm
with:
path: ~/.npm
save-always: true
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node
- name: Install Clojure/ClojureScript dependencies
run: lein deps

- name: Install node.js dependencies
run: npm install

- name: Build Clojurescript
run: lein cljsbuild once test

- name: Run all tests
run: lein doo once
${{ runner.os }}-node
- name: Install Clojure/ClojureScript Dependencies
id: install-clojure-deps
run: lein deps

- name: Install node.js Dependencies
id: install-node-deps
run: npm install

- name: Build Clojurescript
id: build-cljs
run: lein cljsbuild once test

- name: Run All Tests
id: run-tests
run: lein doo once

# This file was automatically copied and populated by rebroadcast
# Do not edit this file directly, instead modify the source at https://github.com/Wall-Brew-Co/rebroadcast/blob/master/sources/github-actions/workflows/clojurescript.yml
6 changes: 5 additions & 1 deletion sources/github-actions/workflows/contributors.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# This file is used to generate the contributors image for each repository.
# Repos with more than 2 non-member, non-bot contributors should link this image in their README.
name: Generate Contributors Image
on:
schedule:
Expand All @@ -13,7 +15,9 @@ jobs:
if: github.repository_owner == 'Wall-Brew-Co'
runs-on: ubuntu-latest
steps:
- uses: wow-actions/contributors-list@v1
- name: Generate Contributors Image
id: contributors
uses: wow-actions/contributors-list@v1
with:
GITHUB_TOKEN: ${{ secrets.WALL_BREW_BOT_PAT }}
svgPath: CONTRIBUTORS.svg
Expand Down
Loading

0 comments on commit a463a8f

Please sign in to comment.