-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update template for the modern era (#9)
Switch from travis to github actions. Make the checklist more explicit about various settings that we've settled on.
- Loading branch information
1 parent
45c4ab6
commit 7d68dfc
Showing
6 changed files
with
62 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Go Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.45.2 | ||
only-new-issues: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,43 +7,19 @@ | |
- [ ] Initialize a new git repo (`git init`) | ||
- [ ] Create the Github repoistory in the web UI. Do not select a project language for a `.gitignore`, or a license (these are included in `gorepotemplate`) | ||
- [ ] Add the Github repository as a git remote (`git remote add origin [email protected]:letsencrypt/<project name>.git`) | ||
- [ ] Disable unneeded Github repository features at `https://github.com/letsencrypt/<projectname>/settings` (e.g. disable Wikis, Projects, etc as appropriate) | ||
- [ ] Configure "Team" collaborator access at `https://github.com/letsencrypt/<projectname>/settings/collaboration` to add dev/SRE teams | ||
- [ ] Enable Travis | ||
- [ ] Enable Coveralls | ||
- [ ] Enable Golang CI (optional) | ||
- [ ] Configure branch protection rules at `https://github.com/letsencrypt/<projectname>/settings/branches` | ||
- [ ] Mark the checklist complete script executable (`chmod +x checklist.complete.sh`) | ||
- [ ] Set up the main repository settings (`https://github.com/letsencrypt/<projectname>/settings`): | ||
- [ ] Disable Wikis, Sponsorships, Projects, and Discussions | ||
- [ ] Only allow squash merging | ||
- [ ] Automatically delete head branches | ||
- [ ] Set up collaborators and teams (`https://github.com/letsencrypt/<projectname/settings/access`): | ||
- [ ] Add "@letsencrypt/boulder-developers" as "maintain" | ||
- [ ] Add "@letsencrypt/ops" as "write" | ||
- [ ] Set up branches (`https://github.com/letsencrypt/<projectname>/settings/branches`): | ||
- [ ] Ensure the default branch is `main`, not `master` | ||
- [ ] Add a branch protection rule for `main`: | ||
- [ ] Require pull requests before merging, require 1 approval, dismiss stale approvals upon new pushes, and require review from Code Owners | ||
- [ ] Require status checks to pass before merging | ||
- [ ] Require linear history | ||
- [ ] Include administrators | ||
- [ ] Restrict who can push to "@letsencrypt/boulder-developers" | ||
- [ ] Run `./checklist.complete.sh` | ||
|
||
# Enabling Travis CI: | ||
|
||
Visit https://travis-ci.org/ (not `.com`, the letsencrypt org is still on the | ||
legacy Travis). Under https://travis-ci.org/account/repositories click the Let's | ||
Encrypt organization and then enable the new repository in "Legacy Services | ||
Integration". You may have to click "sync account" if the repo was created | ||
recently. | ||
|
||
Under the project settings | ||
`https://travis-ci.org/letsencrypt/<projectname>/settings` you may want to | ||
enable a "cron jobs" build of master on a daily interval that always runs. This | ||
helps prevent bitrot when there are not many new commits. | ||
|
||
## Enable Coveralls: | ||
|
||
1. Log in with github to https://coveralls.io/ | ||
1. Add the project repo under https://coveralls.io/repos/new | ||
1. That's it! You don't have to fiddle with a `repo_token` if the repo is | ||
public. | ||
|
||
## Github Branch protection recommendations: | ||
|
||
In the Github branch protection UI configure a branch protection rule for master | ||
that has the following enabled: | ||
|
||
* Require pull request reviews before merging | ||
* Dismiss stale pull request approvals when new commits are pushed | ||
* Require status checks to pass before merging | ||
* Require branches to be up to date before merging | ||
* Travis CI status check required | ||
* Include administrators |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @letsencrypt/boulder-developers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# gorepotemplate | ||
|
||
[![Build Status](https://travis-ci.org/letsencrypt/gorepotemplate.svg?branch=master)](https://travis-ci.org/letsencrypt/gorepotemplate) | ||
[![Coverage Status](https://coveralls.io/repos/github/letsencrypt/gorepotemplate/badge.svg)](https://coveralls.io/github/letsencrypt/gorepotemplate) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/letsencrypt/gorepotemplate)](https://goreportcard.com/report/github.com/letsencrypt/gorepotemplate) | ||
[![Build Status](https://github.com/letsencrypt/gorepotemplate/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/letsencrypt/gorepotemplate/actions/workflows/test.yml?query=branch%3Amain) | ||
|
||
A short description of the project goes here. | ||
|
||
## Usage | ||
|
||
How to use the project, whether in source or binary form. | ||
|
||
## Contributing | ||
|
||
How to set up a development environment, make changes, and run tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/letsencrypt/gorepotemplate | ||
|
||
go 1.15 | ||
go 1.18 |