Skip to content

Commit

Permalink
Hygiene - VS Code Extensions, actions/checkout, tests on.schedule (#447)
Browse files Browse the repository at this point in the history
* Add email to the COC
* Improve the README
* Sets a .vscode/Collatz.code-workspace
* Adds **/.vscode/extensions.json to all implementations.
* Bump all actions/checkout
* Bump all ruby/setup-ruby
* Update the roxygen note for the R implementation.
* Add a cron to all tests to run them all at 9AM on the 15th of every month.
---------
Co-authored-by: Skenvy <>
  • Loading branch information
Skenvy authored Feb 29, 2024
1 parent b679fed commit a971b6b
Show file tree
Hide file tree
Showing 38 changed files with 347 additions and 116 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/C#-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ on:
paths:
- 'C#/**'
- '!C#/**.md'
- '!C#/.vscode/**'
- '.github/workflows/C#-*'
pull_request:
branches:
- 'main'
paths:
- 'C#/**'
- '!C#/**.md'
- '!C#/.vscode/**'
- '.github/workflows/C#-*'
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
workflow_call:
permissions: {}
defaults:
Expand All @@ -27,4 +32,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
11 changes: 6 additions & 5 deletions .github/workflows/R-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'R/**'
- '!R/**.md'
- '!R/.vscode/**'
- '.github/workflows/R-*'
workflow_dispatch:
permissions: {}
Expand All @@ -28,7 +29,7 @@ jobs:
version-tag-exists: ${{ steps.version-tag-exists.outputs.version-tag-exists }}
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
- name: Check if version files changed
Expand Down Expand Up @@ -61,7 +62,7 @@ jobs:
image: rocker/tidyverse:4.2.0
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🧱 Dependencies for Full Test + Suggests
run: make setup_everything
- name: Add the repo as a safe repo inside the job container
Expand All @@ -82,7 +83,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🆒 Download dists
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
Expand All @@ -106,7 +107,7 @@ jobs:
image: rocker/tidyverse:4.2.0
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🥔 Setup
run: make setup_everything
- name: Add the repo as a safe repo inside the job container
Expand All @@ -127,7 +128,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🆒 Download dists
uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # v3.0.1
with:
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/R-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@ on:
paths:
- 'R/**'
- '!R/**.md'
- '!R/.vscode/**'
- '.github/workflows/R-*'
pull_request:
branches:
- 'main'
paths:
- 'R/**'
- '!R/**.md'
- '!R/.vscode/**'
- '.github/workflows/R-*'
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
workflow_call:
permissions: {}
defaults:
Expand All @@ -65,7 +70,7 @@ jobs:
image: rocker/tidyverse:4.2.1
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🧱 Dependencies - GMP version
run: |-
make setup_debian_gmp
Expand All @@ -89,7 +94,7 @@ jobs:
version: ['3.5.0', '4.0.0', '4.2.0', 'devel']
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html
# Tidyverse images are pretty old. 3.5 is like a million years old so needs this.
- name: Tidyverse:3.5 Image - Stretch Archive
Expand Down Expand Up @@ -128,7 +133,7 @@ jobs:
version: ['4.0.0', '4.2.1']
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🏴‍☠️🔵🦜 Set up R
uses: r-lib/actions/setup-r@11a22a908006c25fe054c4ef0ac0436b1de3edbe # v2.6.4
with:
Expand Down Expand Up @@ -165,7 +170,7 @@ jobs:
version: ['4.2.1', 'devel']
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🏴‍☠️🔵🦜 Set up R
uses: r-lib/actions/setup-r@11a22a908006c25fe054c4ef0ac0436b1de3edbe # v2.6.4
with:
Expand All @@ -191,7 +196,7 @@ jobs:
image: rocker/tidyverse:4.2.1
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🥔 Setup
run: make setup_everything
- name: Add the repo as a safe repo inside the job container
Expand Down
36 changes: 26 additions & 10 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ We want different processes for the workflows across four essential categories.
- '.github/workflows/some_lang-*'
```
* Entire Scope CI
It would also be nice to run each of the tests once a month. We're in an AEST+AEDT time zone, and the crons are UTC. It'd be nice to run a test workflow a day, in the morning, say around 9AM for the time it would be in AEST/AEDT. Daylight savings times take effect first Sunday in October and April, so if we are setting the crons to _some day in the month after the 7th_, then April won't be AEDT but October will be. Months `1,2,3,10,11,12` will be AEDT and months `4,5,6,7,8,9` will be AEST. To know what UTC time to set for, we subtract the `11` hours in AEDT, and `10` hours in AEST.
So if we want 9AM tests spread across days, the crons would be something like [`0 22 14 1,2,3,10,11,12 *`](https://crontab.guru/#0_22_14_1,2,3,10,11,12_*) and [`0 23 14 4,5,6,7,8,9 *`](https://crontab.guru/#0_23_14_4,5,6,7,8,9_*) (as an example for the 15th day of the month).
```yaml
on:
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
```

## Templates for workflows; `*-test.yaml` and `*-build.yaml`
Can be search+replace'd on
* `<Language>` + `<language>` + `<language-emojis>`
Expand All @@ -117,14 +127,19 @@ on:
paths:
- '<language>/**'
- '!<language>/**.md'
- '!<language>/.vscode/**'
- '.github/workflows/<language>-*'
pull_request:
branches:
- 'main'
paths:
- '<language>/**'
- '!<language>/**.md'
- '!<language>/.vscode/**'
- '.github/workflows/<language>-*'
schedule: # 9AM on the 15th
- cron: 0 22 14 1,2,3,10,11,12 * # AEDT Months
- cron: 0 23 14 4,5,6,7,8,9 * # AEST Months
workflow_call:
permissions: {}
defaults:
Expand All @@ -140,7 +155,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language>
uses: <gh-action-setup-language@semver>
with:
Expand Down Expand Up @@ -168,7 +183,7 @@ jobs:
arch: [x64]
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language> ${{ matrix.version }}
uses: <gh-action-setup-language@semver>
with:
Expand All @@ -189,7 +204,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language>
uses: <gh-action-setup-language@semver>
with:
Expand Down Expand Up @@ -218,7 +233,7 @@ jobs:
working-directory: <language>/.demo
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language>
uses: <gh-action-setup-language@semver>
with:
Expand Down Expand Up @@ -252,7 +267,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language>
uses: <gh-action-setup-language@semver>
with:
Expand All @@ -272,6 +287,7 @@ on:
paths:
- '<language>/**'
- '!<language>/**.md'
- '!<language>/.vscode/**'
- '.github/workflows/<language>-*'
workflow_dispatch:
permissions: {}
Expand Down Expand Up @@ -301,7 +317,7 @@ jobs:
version-tag-exists: ${{ steps.version-tag-exists.outputs.version-tag-exists }}
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
- name: Check if version files changed
Expand Down Expand Up @@ -332,7 +348,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language>
uses: <gh-action-setup-language@semver>
with:
Expand All @@ -354,7 +370,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: 🆒 Download dists
# uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
# with:
Expand All @@ -374,7 +390,7 @@ jobs:
# Although the dists are built uses checkout to satisfy refs/tags existence
# which were created by the release, prior to uploading to pypi.
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: 🆒 Download dists
# uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
# with:
Expand All @@ -390,7 +406,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: <language-emojis> Set up <Language>
uses: <gh-action-setup-language@semver>
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
version-file-changed: ${{ steps.version-file-check.outputs.version-file-changed }}
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
- name: Check if version files changed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🛡👨‍💻🛡 Init CodeQL
uses: github/codeql-action/init@c3b6fce4ee2ca25bc1066aa3bf73962fda0e8898 # v2.1.31
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Merge 🧬${{ inputs.merge_from }}🧬 into 🐱‍👤 gh-pages 📄
run: |
git config --local user.email "[email protected]"
Expand All @@ -71,7 +71,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: gh-pages
# https://github.com/actions/configure-pages
Expand All @@ -84,7 +84,7 @@ jobs:
# source: ./
# destination: ./_site
- name: 🔻💎🔻 Set up Ruby
uses: ruby/setup-ruby@8ddb7b3348b3951590db24c346e94ebafdabc926 # v1.121.0
uses: ruby/setup-ruby@d4526a55538b775af234ba4af27118ed6f8f6677 # v1.172.0
with:
ruby-version: ${{ env.development_ruby_version }}
rubygems: ${{ env.development_rubygems_version }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/go-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths:
- 'go/**'
- '!go/**.md'
- '!go/.vscode/**'
- '.github/workflows/go-*'
workflow_dispatch:
permissions: {}
Expand All @@ -32,7 +33,7 @@ jobs:
version-tag-exists: ${{ steps.version-tag-exists.outputs.version-tag-exists }}
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
- name: Check if version files changed
Expand Down Expand Up @@ -63,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🔷🐀🔷 Set up Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
Expand All @@ -85,7 +86,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🚰 Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -98,7 +99,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 📦 Publish
run: make publish
docs:
Expand All @@ -109,7 +110,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 🏁 Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: 🔷🐀🔷 Set up Go
uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f # v3.3.1
with:
Expand Down
Loading

0 comments on commit a971b6b

Please sign in to comment.