Skip to content

Commit 5b49899

Browse files
Document workflows (#561)
1 parent 74db5fd commit 5b49899

8 files changed

+121
-49
lines changed

building/config.json

+54-36
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,24 @@
673673
"path": "building/tracks/ci/workflows/configlet.md",
674674
"title": "configlet workflow"
675675
},
676+
{
677+
"uuid": "d7e3f615-3796-43a5-a4a2-632200a8cd47",
678+
"slug": "tracks/ci/workflows/deploy",
679+
"path": "building/tracks/ci/workflows/deploy.md",
680+
"title": "Deploy workflow"
681+
},
682+
{
683+
"uuid": "3a3bea49-9bc0-444c-a95d-93ecc8b0659e",
684+
"slug": "tracks/ci/workflows/no-important-files-changed",
685+
"path": "building/tracks/ci/workflows/no-important-files-changed.md",
686+
"title": "No important files changed workflow"
687+
},
688+
{
689+
"uuid": "b93743e9-4069-46f6-83e9-f873ab8c80c3",
690+
"slug": "tracks/ci/workflows/pause-community-contributions",
691+
"path": "building/tracks/ci/workflows/pause-community-contributions.md",
692+
"title": "Pause community contributions workflow"
693+
},
676694
{
677695
"uuid": "fd512058-4525-4e14-a912-9df870025989",
678696
"slug": "tracks/ci/workflows/sync-labels",
@@ -685,42 +703,6 @@
685703
"path": "building/tracks/ci/migrating-from-travis.md",
686704
"title": "Migrating from Travis"
687705
},
688-
{
689-
"uuid": "40e765ac-3fd1-4c17-8236-7a6e718cfe64",
690-
"slug": "markdown",
691-
"path": "building/markdown/README.md",
692-
"title": "Markdown",
693-
"blurb": ""
694-
},
695-
{
696-
"uuid": "dd132018-e53d-4347-a30d-aadfe6c1743b",
697-
"slug": "markdown/internal-linking",
698-
"path": "building/markdown/internal-linking.md",
699-
"title": "Internal Linking",
700-
"blurb": ""
701-
},
702-
{
703-
"uuid": "2ce5a5bf-229f-4757-9ae0-d6826494dbbf",
704-
"slug": "markdown/markdown",
705-
"path": "building/markdown/markdown.md",
706-
"title": "Markdown Specification",
707-
"blurb": ""
708-
},
709-
{
710-
"uuid": "b2f8687f-77e1-4044-a964-35fd2bd3f1b3",
711-
"slug": "markdown/style-guide",
712-
"path": "building/markdown/style-guide.md",
713-
"title": "Exercism's Style Guide",
714-
"blurb": ""
715-
},
716-
{
717-
"uuid": "d34ced45-63ff-41c7-967d-3ac72e1b5d8e",
718-
"slug": "markdown/widgets",
719-
"path": "building/markdown/widgets.md",
720-
"title": "Widgets",
721-
"blurb": ""
722-
},
723-
724706
{
725707
"uuid": "00b76de0-1e0e-47d0-b293-950d12b1a4c0",
726708
"slug": "tooling",
@@ -889,6 +871,42 @@
889871
"title": "Test Generators",
890872
"blurb": ""
891873
},
874+
875+
{
876+
"uuid": "40e765ac-3fd1-4c17-8236-7a6e718cfe64",
877+
"slug": "markdown",
878+
"path": "building/markdown/README.md",
879+
"title": "Markdown",
880+
"blurb": ""
881+
},
882+
{
883+
"uuid": "dd132018-e53d-4347-a30d-aadfe6c1743b",
884+
"slug": "markdown/internal-linking",
885+
"path": "building/markdown/internal-linking.md",
886+
"title": "Internal Linking",
887+
"blurb": ""
888+
},
889+
{
890+
"uuid": "2ce5a5bf-229f-4757-9ae0-d6826494dbbf",
891+
"slug": "markdown/markdown",
892+
"path": "building/markdown/markdown.md",
893+
"title": "Markdown Specification",
894+
"blurb": ""
895+
},
896+
{
897+
"uuid": "b2f8687f-77e1-4044-a964-35fd2bd3f1b3",
898+
"slug": "markdown/style-guide",
899+
"path": "building/markdown/style-guide.md",
900+
"title": "Exercism's Style Guide",
901+
"blurb": ""
902+
},
903+
{
904+
"uuid": "d34ced45-63ff-41c7-967d-3ac72e1b5d8e",
905+
"slug": "markdown/widgets",
906+
"path": "building/markdown/widgets.md",
907+
"title": "Widgets",
908+
"blurb": ""
909+
},
892910
{
893911
"uuid": "3423667a-3b30-4590-9a88-5a30f712f382",
894912
"slug": "product",

building/tracks/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ csharp
102102

103103
### Avoiding triggering unnecessary test runs
104104

105-
When you merge a track PR that touches an exercise, it triggers the latest published iteration of students' solutions to be re-tested.
105+
When you merge a track PR that touches an exercise, it triggers _all_ the latest published iteration of students' solutions to be re-tested.
106106
For popular exercises, this is a _very_ expensive operation (70,000 test runs for Python Hello World as an extreme!).
107107

108108
**We encourage you to try and avoid doing this unnecessarily.**

building/tracks/ci/workflows.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,29 @@ You should thus not manually change their contents.
2323

2424
### General workflows
2525

26-
- [`sync-labels.yml`](/docs/building/tracks/ci/workflows/sync-labels): automatically syncs the repository's labels from a `labels.yml` file
26+
- [Sync labels](/docs/building/tracks/ci/workflows/sync-labels): sync the repository's labels from file
2727

2828
### Track-specific workflows
2929

30-
- [`configlet.yml`](/docs/building/tracks/ci/workflows/configlet): runs the [configlet tool](/docs/building/configlet), which checks if a track's (configuration) files are properly structured - both syntactically and semantically
31-
- `no-important-files-changed.yml`: checks if pull requests would cause all existing solutions of one or more changes exercises to be re-run
32-
- `test.yml`: verify the track's exercises
30+
- [configlet](/docs/building/tracks/ci/workflows/configlet): checks if the track's (configuration) files are properly structured - both syntactically and semantically
31+
- [No important files changed](/docs/building/tracks/ci/workflows/no-important-files-changed): comments on pull requests that would cause re-testing of existing solutions
32+
- [Test](/docs/building/tracks/new/setup-continuous-integration#h-test-workflow): verify the track's exercises
3333

3434
### Tooling-specific workflows
3535

36-
- `deploy.yml`: deploy the tooling Docker image to Docker Hub and ECR
36+
- [Deploy](/docs/building/tracks/ci/workflows/deploy): deploy the track tooling Docker image to Docker Hub and ECR
37+
38+
### Optional workflows
39+
40+
There are also some workflows that tracks might opt-into:
41+
42+
- [Pause community contributions](/docs/building/tracks/ci/workflows/pause-community-contributions): auto-comment on newly issues and PRs created by users who are not member of the Exercism GitHub organisation
3743

3844
## Custom workflows
3945

4046
Maintainers are free to add custom workflows to their repos.
4147
Examples of such workflows could be:
4248

43-
- Linting of shell scripts ([example](https://github.com/exercism/configlet/blob/3baa09608c8ac327315c887608c13a68ae8ac359/.github/workflows/shellcheck.yml))
44-
- Auto-commenting on pull requests ([example](https://github.com/exercism/elixir/blob/b737f80cc93fcfdec6c53acb7361819834782470/.github/workflows/pr-comment.yml))
49+
- [Linting of shell scripts](https://github.com/exercism/configlet/blob/3baa09608c8ac327315c887608c13a68ae8ac359/.github/workflows/shellcheck.yml)
50+
- [Auto-commenting on pull requests](https://github.com/exercism/elixir/blob/b737f80cc93fcfdec6c53acb7361819834782470/.github/workflows/pr-comment.yml)
4551
- Etc.

building/tracks/ci/workflows/configlet.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# configlet workflow
22

3-
The `configlet` workflow is defined in the `.github/workflows/configlet.yml` file.
4-
It uses the [configlet tool](/docs/building/configlet) to check if a track's (configuration) files are properly structured - both syntactically and semantically.
3+
The configlet uses the [configlet tool](/docs/building/configlet) to check if a track's (configuration) files are properly structured - both syntactically and semantically.
54
It does this by running [`configlet lint`](/docs/building/configlet/lint).
65

76
## Enable checking file formatting
@@ -30,3 +29,7 @@ fmt = true
3029
```
3130

3231
3. Once this PR is merged, the `configlet` workflow will also verify the track's configuration files' formatting.
32+
33+
## Source
34+
35+
The workflow is defined in the `.github/workflows/configlet.yml` file.
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Deploy workflow
2+
3+
The deploy workflow is used to deploy [track tooling](/docs/building/tooling) to:
4+
5+
1. [Docker Hub](https://hub.docker.com/): used in scripts or for local testing.
6+
Publicly available.
7+
2. [ECR](https://aws.amazon.com/ecr/): used in the production environment to test submitted solutions.
8+
Private.
9+
10+
## Source
11+
12+
The workflow is defined in the `.github/workflows/deploy.yml` file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# No important files changed workflow
2+
3+
When a track PR is merged that touches an exercise, it triggers _all_ the latest published iteration of students' solutions to be re-tested.
4+
For popular exercises, this is a _very_ expensive operation (70,000 test runs for Python Hello World as an extreme!).
5+
6+
This workflow checks if the changes in a PR would trigger the re-testing of solutions, and if so, it adds a comment explaining the risk of merging the PR _as is_.
7+
It also explains how to merge the PR without re-testing solutions.
8+
9+
For more information, check the [Avoiding triggering unnecessary test runs](https://exercism.org/docs/building/tracks#h-avoiding-triggering-unnecessary-test-runs) documentation.
10+
11+
## Source
12+
13+
The workflow is defined in the `.github/workflows/no-important-files-changed.yml` file.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Pause community contributions
2+
3+
Some repositories don't have the resources to triage/review issues or pull requests from non-maintainer users.
4+
The pause community solutions
5+
If a repository has enabled this workflow, it will automatically comment on a newly opened issue or pull request if the author is _not_ member of Exercism's GitHub organisation.
6+
The comment will suggest the user to first open a topic on the Exercism forum.
7+
8+
## Enabling the workflow
9+
10+
Add the [.github/workflows/pause-community-contributions.yml file](https://github.com/exercism/github-actions/blob/b5424c17f661f5529493258a1ad480013351aa9e/.github/workflows/pause-community-contributions.yml) into your repository.
11+
12+
## Disabling the workflow
13+
14+
Remove the workflow file from your repository.
15+
16+
## Source
17+
18+
The workflow is defined in the `.github/workflows/pause-community-contributions.yml` file.

building/tracks/ci/workflows/sync-labels.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Sync labels workflow
22

3-
The sync labels workflow is defined in the `.github/workflows/sync-labels.yml` file.
4-
The goal of this workflow is to add/update/delete the repository's [GitHub labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels).
5-
The labels themselves are defined in the `.github/labels.yml` file.
3+
The sync labels workflow synchronizes a repository's [GitHub labels](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels) with the contents of the `.github/labels.yml` file.
64
Whenever the `.github/labels.yml` file changes, the sync labels workflow will automatically update the repository's labels.
75

86
## Customizing labels
@@ -19,3 +17,7 @@ After merging that PR, the labels will be automatically updated (see description
1917
```exercism/caution
2018
Never manually edit the `.github/labels.yml` file, as those changes will be overwritten the next time labels are synced.
2119
```
20+
21+
## Source
22+
23+
The workflow is defined in the `.github/workflows/sync-labels.yml` file.

0 commit comments

Comments
 (0)