Skip to content

Commit

Permalink
Merge pull request #48 from tarosky/issue/47
Browse files Browse the repository at this point in the history
Glob patterns for bypassing minifier
Close #47.
  • Loading branch information
harai authored May 7, 2023
2 parents 4cddea9 + 02b15ff commit 024ed37
Show file tree
Hide file tree
Showing 6 changed files with 316 additions and 289 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ env:
AWS_ACCOUNT_ID: '013230744746'
S3_BUCKET: gutenberg-ext-imgserver-tests3bucket-t4nafmwadd9f
PUBLIC_CONTENT_S3_BUCKET: gutenberg-ext-imgserver-tests3publicbucket-1aeju3m5t5nuy
GO_VERSION: 1.16.13
GO_VERSION: 1.20.3

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '~${{env.GO_VERSION}}'
- run: echo "$ACCESS_KEY_ID" > config/test/access-key-id
Expand All @@ -32,9 +36,9 @@ jobs:
- run: echo "$TEST_AWS_SECRET_ACCESS_KEY" > config/test/secret-access-key
env:
TEST_AWS_SECRET_ACCESS_KEY: ${{secrets.TEST_AWS_SECRET_ACCESS_KEY}}
- run: go get github.com/ahmetb/govvv
- run: go install github.com/ahmetb/govvv@latest
- name: Generate build number
uses: einaregilsson/build-number@v3
uses: onyxmueller/build-tag-number@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
prefix: build_number_generator
Expand All @@ -45,20 +49,25 @@ jobs:
- name: Embed build number into code
run: echo "build-$BUILD_NUMBER" > ./VERSION
- run: ~/go/bin/govvv build -o work/imgserver .
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: artifact
path: work/imgserver
- uses: actions/upload-artifact@v2
if-no-files-found: error
- uses: actions/upload-artifact@v3
with:
name: build-number
path: work/BUILD_NUMBER
if-no-files-found: error

test:
runs-on: ubuntu-20.04
permissions:
checks: write
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '~${{env.GO_VERSION}}'
- run: echo "$ACCESS_KEY_ID" > config/test/access-key-id
Expand All @@ -68,14 +77,13 @@ jobs:
- run: echo "$TEST_AWS_SECRET_ACCESS_KEY" > config/test/secret-access-key
env:
TEST_AWS_SECRET_ACCESS_KEY: ${{secrets.TEST_AWS_SECRET_ACCESS_KEY}}
- run: go get -u github.com/jstemmer/go-junit-report
- run: go install github.com/jstemmer/go-junit-report@latest
- run: go test -v ./... 2>&1 | tee work/test.log
- run: go-junit-report < work/test.log | tee work/report.xml
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
github_token: ${{secrets.GITHUB_TOKEN}}
files: work/report.xml

release:
Expand All @@ -85,10 +93,10 @@ jobs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: artifact
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: build-number
- name: set BUILD_NUMBER
Expand Down
78 changes: 55 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,32 +1,64 @@
module github.com/tarosky/gutenberg-imgserver

go 1.16
go 1.20

require (
github.com/aws/aws-sdk-go-v2 v1.14.0
github.com/aws/aws-sdk-go-v2/config v1.14.0
github.com/aws/aws-sdk-go-v2/credentials v1.9.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.25.0
github.com/aws/aws-sdk-go-v2/service/sqs v1.17.0
github.com/aws/smithy-go v1.11.0
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/gin-gonic/gin v1.7.7
github.com/go-playground/validator/v10 v10.10.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.18.0
github.com/aws/aws-sdk-go-v2/config v1.18.22
github.com/aws/aws-sdk-go-v2/credentials v1.13.21
github.com/aws/aws-sdk-go-v2/service/s3 v1.33.0
github.com/aws/aws-sdk-go-v2/service/sqs v1.20.9
github.com/aws/smithy-go v1.13.5
github.com/gin-gonic/gin v1.9.0
github.com/gobwas/glob v0.2.3
github.com/golang/protobuf v1.5.2 // indirect
github.com/stretchr/testify v1.8.2
github.com/urfave/cli/v2 v2.25.1
go.uber.org/zap v1.24.0
)

require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.9 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.9 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.18.10 // indirect
github.com/bytedance/sonic v1.8.8 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.13.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/stretchr/testify v1.7.0
github.com/ugorji/go v1.2.7 // indirect
github.com/urfave/cli/v2 v2.3.0
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.21.0
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 024ed37

Please sign in to comment.