Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix broken build #153

Merged
merged 3 commits into from
Sep 15, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
62 changes: 37 additions & 25 deletions .github/workflows/test.yaml
Expand Up @@ -5,23 +5,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.19"

- name: Check out code
uses: actions/checkout@v3

- uses: actions/cache@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Dependencies
run: go mod download
working-directory: updater
go-version-file: 'updater/go.mod'
cache-dependency-path: 'updater/go.mod'
cache: true

- name: Test
run: go test -race -v -coverprofile=profile.cov ./...
Expand All @@ -39,40 +31,60 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.19"
go-version-file: 'holidays-api/go.mod'
cache-dependency-path: 'holidays-api/go.mod'
cache: true

- name: Test
run: go test -race -v -coverprofile=profile.cov ./...
working-directory: holidays-api

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true
flag-name: holidays-api
working-directory: holidays-api

test-update-trigger:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- uses: actions/cache@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Dependencies
run: go mod download
working-directory: holidays-api
go-version-file: 'update-trigger/trigger/go.mod'
cache-dependency-path: 'update-trigger/trigger/go.mod'
cache: true

- name: Test
run: go test -race -v -coverprofile=profile.cov ./...
working-directory: holidays-api
working-directory: update-trigger/trigger

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true
flag-name: holidays-api
working-directory: holidays-api
flag-name: update-trigger/trigger
working-directory: update-trigger/trigger

finish:
if: always
shogo82148 marked this conversation as resolved.
Show resolved Hide resolved
needs:
- test-updater
- test-holidays-api
- test-update-trigger
runs-on: ubuntu-latest
steps:
- name: finish
Expand Down
2 changes: 1 addition & 1 deletion update-trigger/trigger/main.go
Expand Up @@ -51,7 +51,7 @@ func loadGitHubToken(ctx context.Context) (string, error) {

token, err := svc.GetParameter(ctx, &ssm.GetParameterInput{
Name: aws.String(os.Getenv("GITHUB_TOKEN")),
WithDecryption: true,
WithDecryption: aws.Bool(true),
})
if err != nil {
return "", err
Expand Down