Skip to content

Commit 6869162

Browse files
authored
Merge pull request #147 from Hofer-Julian/modernize-tooling
ci: modernize tooling with pnpm, prettier and TypeScript
2 parents 93540a5 + 2c89b7f commit 6869162

46 files changed

Lines changed: 6543 additions & 7552 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/dependabot.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: npm
8+
directory: /
9+
schedule:
10+
interval: weekly

‎.github/workflows/checks.yml‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: checks
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
permissions:
8+
contents: read
9+
jobs:
10+
checks:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
14+
with:
15+
persist-credentials: false
16+
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
17+
- run: pixi run lint
18+
- run: pixi run build-docs

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,36 @@
1-
name: Copy staging packages
2-
3-
on:
4-
workflow_dispatch:
5-
schedule:
6-
- cron: "42 * * * *"
7-
8-
jobs:
9-
copy-packages-noetic:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v5
13-
- uses: prefix-dev/setup-pixi@v0.10.0
14-
- env:
15-
ANACONDA_API_TOKEN: ${{ secrets.ROBOSTACK_NOETIC_ANACONDA_API_TOKEN }}
16-
run: |
17-
python copy-to-distro-specific-channel.py noetic 2025-01-01
18-
shell: pixi run bash -e {0}
19-
20-
copy-packages-humble:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v5
24-
- uses: prefix-dev/setup-pixi@v0.10.0
25-
- env:
26-
ANACONDA_API_TOKEN: ${{ secrets.ROBOSTACK_HUMBLE_ANACONDA_API_TOKEN }}
27-
run: |
28-
python copy-to-distro-specific-channel.py humble 2025-01-01
29-
shell: pixi run bash -e {0}
1+
name: Copy staging packages
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "42 * * * *"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
copy-packages-noetic:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
16+
with:
17+
persist-credentials: false
18+
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
19+
- env:
20+
ANACONDA_API_TOKEN: ${{ secrets.ROBOSTACK_NOETIC_ANACONDA_API_TOKEN }}
21+
run: |
22+
python scripts/copy-to-distro-specific-channel.py noetic 2025-01-01
23+
shell: pixi run bash -e {0}
24+
25+
copy-packages-humble:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
29+
with:
30+
persist-credentials: false
31+
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
32+
- env:
33+
ANACONDA_API_TOKEN: ${{ secrets.ROBOSTACK_HUMBLE_ANACONDA_API_TOKEN }}
34+
run: |
35+
python scripts/copy-to-distro-specific-channel.py humble 2025-01-01
36+
shell: pixi run bash -e {0}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
auto-merge:
10+
runs-on: ubuntu-latest
11+
if: github.event.pull_request.user.login == 'dependabot[bot]'
12+
steps:
13+
- name: Fetch dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2
16+
with:
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
- name: Enable auto-merge
19+
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
20+
run: gh pr merge --auto --merge "$PR_URL"
21+
env:
22+
PR_URL: ${{ github.event.pull_request.html_url }}
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/deploy.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_run:
7+
workflows: ["Update package table"]
8+
types: [completed]
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
# `ghp-import --push` pushes the built site to the gh-pages branch
13+
permissions:
14+
contents: write
15+
steps:
16+
# ghp-import pushes with the credentials persisted by checkout
17+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
18+
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
19+
- run: pixi run gh-deploy
Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update distro tables
1+
name: Update package table
22

33
on:
44
schedule:
@@ -8,47 +8,52 @@ on:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
11-
if: github.ref == 'refs/heads/master'
11+
if: github.ref == 'refs/heads/main'
12+
# The push step writes the regenerated tables back to the repository
13+
permissions:
14+
contents: write
1215
steps:
13-
- name: Checkout robostack.github.io
14-
uses: actions/checkout@v4
15-
- uses: prefix-dev/setup-pixi@v0.10.0
16-
# foxy and galactic are end-of-life; public/data/{foxy,galactic}.json are
17-
# committed snapshots and deliberately not regenerated here.
18-
- name: Create table noetic
19-
run: |
20-
pixi run compare-completeness noetic robostack-noetic
21-
- name: Create table humble
22-
run: |
23-
pixi run compare-completeness humble robostack-humble
24-
- name: Create table jazzy
25-
run: |
26-
pixi run compare-completeness jazzy robostack-jazzy
27-
- name: Create table kilted
28-
run: |
29-
pixi run compare-completeness kilted robostack-kilted
30-
- name: Create table rolling
31-
run: |
32-
pixi run compare-completeness rolling https://prefix.dev/robostack-rolling
33-
- name: Create table lyrical
34-
run: |
35-
pixi run compare-completeness lyrical https://prefix.dev/robostack-lyrical
36-
- name: Commit changes
37-
id: commit
38-
run: |
39-
git config --local user.email "action@github.com"
40-
git config --local user.name "GitHub Action"
41-
git add public/data/noetic.json
42-
git add public/data/humble.json
43-
git add public/data/jazzy.json
44-
git add public/data/kilted.json
45-
git add public/data/rolling.json
46-
git add public/data/lyrical.json
47-
git commit -m "Update tables"
48-
continue-on-error: true
49-
- name: Push changes
50-
if: steps.commit.outcome == 'success'
51-
uses: ad-m/github-push-action@master
52-
with:
53-
github_token: ${{ secrets.GITHUB_TOKEN }}
54-
branch: ${{ github.ref }}
16+
- name: Checkout robostack.github.io
17+
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
18+
with:
19+
persist-credentials: false
20+
- uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
21+
# foxy and galactic are end-of-life; public/data/{foxy,galactic}.json are
22+
# committed snapshots and deliberately not regenerated here.
23+
- name: Create table noetic
24+
run: |
25+
pixi run compare-completeness noetic robostack-noetic
26+
- name: Create table humble
27+
run: |
28+
pixi run compare-completeness humble robostack-humble
29+
- name: Create table jazzy
30+
run: |
31+
pixi run compare-completeness jazzy robostack-jazzy
32+
- name: Create table kilted
33+
run: |
34+
pixi run compare-completeness kilted robostack-kilted
35+
- name: Create table rolling
36+
run: |
37+
pixi run compare-completeness rolling https://prefix.dev/robostack-rolling
38+
- name: Create table lyrical
39+
run: |
40+
pixi run compare-completeness lyrical https://prefix.dev/robostack-lyrical
41+
- name: Commit changes
42+
id: commit
43+
run: |
44+
git config --local user.email "action@github.com"
45+
git config --local user.name "GitHub Action"
46+
git add public/data/noetic.json
47+
git add public/data/humble.json
48+
git add public/data/jazzy.json
49+
git add public/data/kilted.json
50+
git add public/data/rolling.json
51+
git add public/data/lyrical.json
52+
git commit -m "Update tables"
53+
continue-on-error: true
54+
- name: Push changes
55+
if: steps.commit.outcome == 'success'
56+
uses: ad-m/github-push-action@881a6320fdb16eb5318c5054f31c218aec2b324c # master
57+
with:
58+
github_token: ${{ secrets.GITHUB_TOKEN }}
59+
branch: ${{ github.ref }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Upgrade dependencies
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
workflow_dispatch:
9+
schedule:
10+
# At 05:00 on day 1 of the month
11+
- cron: 0 5 1 * *
12+
13+
jobs:
14+
pixi-upgrade:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
18+
with:
19+
persist-credentials: false
20+
- name: Set up pixi
21+
uses: prefix-dev/setup-pixi@a09b6247153796b190642a2b53fac4241043cf6f # v0.10.0
22+
with:
23+
run-install: false
24+
- name: Upgrade dependencies
25+
run: |
26+
set -o pipefail
27+
pixi upgrade --json | pixi exec pixi-diff-to-markdown >> diff.md
28+
- name: Create pull request
29+
uses: peter-evans/create-pull-request@22a9089034f40e5a961c8808d113e2c98fb63676 # v7
30+
with:
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
commit-message: "chore: upgrade pixi dependencies"
33+
title: Upgrade pixi dependencies
34+
body-path: diff.md
35+
branch: upgrade-pixi
36+
base: main
37+
labels: pixi
38+
delete-branch: true
39+
add-paths: |
40+
pixi.toml
41+
pixi.lock

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ RoboStack Website/
99
node_modules
1010
dist
1111
.astro
12+
13+
# pnpm package store
14+
.pnpm-store

‎.prettierignore‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Generated package tables
2+
public/data/*.json
3+
# Prettier's MDX v1 parser corrupts code fences nested in JSX components
4+
*.mdx
5+
# Lockfiles
6+
pixi.lock
7+
pnpm-lock.yaml

0 commit comments

Comments
 (0)