Skip to content

Commit 7fd409f

Browse files
authored
chore: add CI step for validating contributor READMEs
Closes coder/internal#530 ## Changes made - Created top-level test directories for Coder and NataInData (a developer who contributed a module for us in the past) - Created Go script for validating the structure of each README, while being as granular as possible with any errors for better feedback - Added CI step for running the script ## Notes - I did a good bit of manual testing, but I am planning to circle back with a follow-up PR to add proper tests for the script functionality. I might push that off until after the majority of the new Registry work is done, though - Not 100% sold on the structure of the Go directories. That's likely to change as I add more code for validating the modules and templates
2 parents 03179a2 + 50d651c commit 7fd409f

File tree

8 files changed

+539
-0
lines changed

8 files changed

+539
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches: [main]
5+
# Cancel in-progress runs for pull requests when developers push new changes
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
9+
jobs:
10+
validate-contributors:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v4
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: "1.23.2"
19+
- name: Validate contributors
20+
run: go build ./scripts/contributors && ./contributors
21+
- name: Remove build file artifact
22+
run: rm ./contributors

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,6 @@ dist
134134
.yarn/build-state.yml
135135
.yarn/install-state.gz
136136
.pnp.*
137+
138+
# Script output
139+
/contributors

go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module coder.com/coder-registry
2+
3+
go 1.23.2
4+
5+
require gopkg.in/yaml.v3 v3.0.1

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
2+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
4+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

registry/coder/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
display_name: Coder
3+
bio: Coder provisions cloud development environments via Terraform, supporting Linux, macOS, Windows, X86, ARM, Kubernetes and more.
4+
github: coder
5+
linkedin: https://www.linkedin.com/company/coderhq
6+
website: https://www.coder.com
7+
support_email: support@coder.com
8+
status: official
9+
---
10+
11+
# Coder
12+
13+
Coder provisions cloud development environments via Terraform, supporting Linux, macOS, Windows, X86, ARM, Kubernetes and more.

registry/nataindata/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
display_name: Nataindata
3+
bio: Data engineer
4+
github: nataindata
5+
website: https://www.nataindata.com
6+
status: community
7+
---

0 commit comments

Comments
 (0)