You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+37
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,43 @@ By storing them in a central place (here), and distributing them in an automated
5
5
1. Consistency: Every participating repository uses the same workflow, ensuring that our code adheres to the same coding standards and is properly tested.
6
6
2. Maintainability: Workflows change over time. We need to be able to make changes without manually updating dozens of repositories.
7
7
8
+
## Customization
9
+
10
+
### Additional Setup Steps
11
+
12
+
Most repositories won't need any customization, and the workflows defined here will just work fine.
13
+
Some repositories may require some pre-setup steps to be run before tests (or code checks) can be run. Setup steps for `go-test` are defined in `.github/actions/go-test-setup/action.yml`, and setup steps for `go-check` are defined in `.github/actions/go-check-setup/action.yml`, in the following format:
14
+
15
+
```yml
16
+
runs:
17
+
using: "composite"
18
+
steps:
19
+
- name: Step 1
20
+
shell: bash
21
+
run: echo "do some initial setup"
22
+
- name: Step 2
23
+
shell: bash
24
+
run: echo "do some Linux-specific setup"
25
+
if: ${{ matrix.os == 'ubuntu' }}
26
+
```
27
+
28
+
These setup steps are run after the repository has been checked out and after Go has been installed, but before any tests or checks are run.
29
+
30
+
### Configuration
31
+
32
+
`go-check` contains an optional step that checks that running `go generate` doesn't change any files.
33
+
This is useful to make sure that the generated code stays in sync.
34
+
35
+
This check will be run in repositories that set `gogenerate` to `true` in `.github/workflows/go-check-config.json`:
36
+
```json
37
+
{
38
+
"gogenerate": true
39
+
}
40
+
```
41
+
42
+
Note that depending on the code generators used, it might be necessary to [install those first](#additional-setup-steps).
43
+
The generators must also be deterministic, to prevent CI from getting different results each time.
44
+
8
45
## Technical Details
9
46
10
47
This repository currently defines two workflows for Go repositories:
0 commit comments