-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #511 from ampproject/master
Snapshot release version 6.
- Loading branch information
Showing
27 changed files
with
348 additions
and
92 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,54 @@ | ||
name: Check prerequisites | ||
on: [push, pull_request] | ||
jobs: | ||
check-format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go 1.16 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Install goimports | ||
run: go get golang.org/x/tools/cmd/goimports | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
|
||
# Comment this out for now until amppackager passes goimports. | ||
# https://github.com/ampproject/amppackager/issues/506 | ||
# - name: Check formatting with goimports | ||
# run: | | ||
# if $(go env GOPATH)/bin/goimports -d . | grep . ; then | ||
# exit 1 | ||
# fi | ||
|
||
go-vet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go 1.16 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Diagnose the code with go vet | ||
# TODO(banaag): Turn on composite checking when | ||
# https://github.com/ampproject/amppackager/issues/507 is fixed. | ||
run: go vet -composites=false ./... | ||
|
||
go-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Go 1.16 | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: '1.16' | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run the tests | ||
run: go test ./... |
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
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 |
---|---|---|
|
@@ -191,10 +191,6 @@ ForwardedRequestHeaders = [] | |
# PathRE = "/world/.*" | ||
# QueryRE = "" | ||
|
||
# IMPORTANT NOTE: the support of the ACME protocol and automatic renewal of certificates is currently in the | ||
# EXPERIMENTAL stage. Once we have more experience with people using it out in the wild, we will gradually | ||
# move it to PRODUCTION mode. | ||
# | ||
# ACME is a protocol that allows for automatic renewal of certificates. AMP Packager uses an ACME library | ||
# https://github.com/go-acme/lego to handle certificate renewal. Automatic certificate renewal is enabled | ||
# in AMP Packager via the 'autorenewcert' flag. Turning the flag on will enable AMP Packager to automatically | ||
|
@@ -227,6 +223,15 @@ ForwardedRequestHeaders = [] | |
# request signed exchange certificates. | ||
# EmailAddress = "[email protected]" | ||
|
||
# The EABKid and EABHmac need to have synchronized values. They can both be empty (in which case EAB is not used) | ||
# or both have valid values. If one is empty and the other is not, the AMP Packager will generate an error. | ||
# This is the Key Identifier from ACME CA. Used for External Account Binding. | ||
# EABKid = "eab.kid" | ||
|
||
# This is the MAC Key from ACME CA. Used for External Account Binding. Should be in | ||
# Base64 URL Encoding without padding format. | ||
# EABHmac = "eab.hmac" | ||
|
||
# For the remaining configuration items, it's important to understand the different challenges employed as | ||
# part of the ACME protocol. See: | ||
# https://ietf-wg-acme.github.io/acme/draft-ietf-acme-acme.html#identifier-validation-challenges | ||
|
@@ -265,6 +270,8 @@ ForwardedRequestHeaders = [] | |
# [ACMEConfig.Development] | ||
# DiscoURL = "https://development-acme.discovery.url/" | ||
# EmailAddress = "[email protected]" | ||
# EABKid = "eab.kid" | ||
# EABHmac = "eab.hmac" | ||
# HttpChallengePort = 5002 | ||
# HttpWebRootDir = '/path/to/www_root_dir' | ||
# TlsChallengePort = 5003 | ||
|
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
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
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
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
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
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 |
---|---|---|
|
@@ -89,8 +89,8 @@ func TestNewFetcher(t *testing.T) { | |
DNSNames: []string{"test.example.com"}, | ||
} | ||
|
||
fetcher, err := New("[email protected]", &csr, privateKey, apiURL+"/dir", | ||
5002, "", 0, "", false) | ||
fetcher, err := New("[email protected]", "eab.kid", "eab.hmac", &csr, | ||
privateKey, apiURL+"/dir", 5002, "", 0, "", false) | ||
assert.Nil(t, err) | ||
assert.NotNil(t, fetcher.legoClient) | ||
assert.Equal(t, "[email protected]", fetcher.AcmeUser.Email) | ||
|
@@ -120,8 +120,8 @@ func TestFetchCertSuccess(t *testing.T) { | |
DNSNames: []string{"test.example.com"}, | ||
} | ||
|
||
fetcher, err := New("[email protected]", &csr, privateKey, apiURL+"/dir", | ||
5002, "", 0, "", false) | ||
fetcher, err := New("[email protected]", "eab.kid", "eab.hmac", &csr, | ||
privateKey, apiURL+"/dir", 5002, "", 0, "", false) | ||
assert.Nil(t, err) | ||
assert.NotNil(t, fetcher) | ||
|
||
|
@@ -151,8 +151,8 @@ func TestFetchCertFail(t *testing.T) { | |
DNSNames: []string{"test.example.com"}, | ||
} | ||
|
||
fetcher, err := New("[email protected]", &csr, privateKey, apiURL+"/dir", | ||
5002, "", 0, "", false) | ||
fetcher, err := New("[email protected]", "eab.kid", "eab.hmac", &csr, | ||
privateKey, apiURL+"/dir", 5002, "", 0, "", false) | ||
assert.Nil(t, err) | ||
assert.NotNil(t, fetcher) | ||
|
||
|
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
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
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
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
Oops, something went wrong.