Skip to content

Commit

Permalink
💚 Run pr without secret (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone authored Oct 27, 2023
1 parent 4e9b79f commit 13dc3f4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: tosone
Expand Down Expand Up @@ -91,6 +92,7 @@ jobs:
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: tosone
Expand Down Expand Up @@ -145,6 +147,7 @@ jobs:
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: tosone
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,21 @@ jobs:
restore-keys: |
${{ runner.os }}-go-test-sqlite3-
- name: Run tests
if: ${{ github.event_name != 'pull_request' }}
env:
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT_SQLITE }}
COS_AK: ${{ secrets.COS_AK }}
COS_SK: ${{ secrets.COS_SK }}
run: |
CI_DATABASE_TYPE=sqlite3 go test -timeout 30m -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v "pkg/tests" | grep -v "pkg/dal/query" | grep -v "pkg/dal/cmd" | grep -v "pkg/types/enums" | grep -v "pkg/handlers/apidocs" | grep -v "pkg/utils/token/mocks" | grep -v "pkg/utils/password/mocks" | grep -v "pkg/handlers/distribution/clients/mocks"`
- name: Run tests
if: ${{ github.event_name == 'pull_request' }}
env:
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT_SQLITE }}
COS_AK: ${{ secrets.COS_AK }}
COS_SK: ${{ secrets.COS_SK }}
run: |
CI_DATABASE_TYPE=sqlite3 go test -timeout 30m -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v "pkg/tests" | grep -v "pkg/dal/query" | grep -v "pkg/dal/cmd" | grep -v "pkg/types/enums" | grep -v "pkg/handlers/apidocs" | grep -v "pkg/utils/token/mocks" | grep -v "pkg/utils/password/mocks" | grep -v "pkg/handlers/distribution/clients/mocks" | grep -v "pkg/storage/cos"`
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -141,12 +150,21 @@ jobs:
restore-keys: |
${{ runner.os }}-go-test-postgresql-
- name: Run tests
if: ${{ github.event_name != 'pull_request' }}
env:
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT_POSTGRESQL }}
COS_AK: ${{ secrets.COS_AK }}
COS_SK: ${{ secrets.COS_SK }}
run: |
CI_DATABASE_TYPE=postgresql go test -timeout 30m -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v "pkg/tests" | grep -v "pkg/dal/query" | grep -v "pkg/dal/cmd" | grep -v "pkg/types/enums" | grep -v "pkg/handlers/apidocs" | grep -v "pkg/utils/token/mocks" | grep -v "pkg/utils/password/mocks" | grep -v "pkg/handlers/distribution/clients/mocks"`
- name: Run tests
if: ${{ github.event_name == 'pull_request' }}
env:
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT_POSTGRESQL }}
COS_AK: ${{ secrets.COS_AK }}
COS_SK: ${{ secrets.COS_SK }}
run: |
CI_DATABASE_TYPE=postgresql go test -timeout 30m -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v "pkg/tests" | grep -v "pkg/dal/query" | grep -v "pkg/dal/cmd" | grep -v "pkg/types/enums" | grep -v "pkg/handlers/apidocs" | grep -v "pkg/utils/token/mocks" | grep -v "pkg/utils/password/mocks" | grep -v "pkg/handlers/distribution/clients/mocks" | grep -v "pkg/storage/cos"`
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down Expand Up @@ -213,12 +231,21 @@ jobs:
restore-keys: |
${{ runner.os }}-go-test-mysql-
- name: Run tests
if: ${{ github.event_name != 'pull_request' }}
env:
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT_MYSQL }}
COS_AK: ${{ secrets.COS_AK }}
COS_SK: ${{ secrets.COS_SK }}
run: |
CI_DATABASE_TYPE=mysql go test -timeout 30m -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v "pkg/tests" | grep -v "pkg/dal/query" | grep -v "pkg/dal/cmd" | grep -v "pkg/types/enums" | grep -v "pkg/handlers/apidocs" | grep -v "pkg/utils/token/mocks" | grep -v "pkg/utils/password/mocks" | grep -v "pkg/handlers/distribution/clients/mocks"`
- name: Run tests
if: ${{ github.event_name == 'pull_request' }}
env:
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT_MYSQL }}
COS_AK: ${{ secrets.COS_AK }}
COS_SK: ${{ secrets.COS_SK }}
run: |
CI_DATABASE_TYPE=mysql go test -timeout 30m -v -coverprofile=coverage.txt -covermode=atomic `go list ./... | grep -v "pkg/tests" | grep -v "pkg/dal/query" | grep -v "pkg/dal/cmd" | grep -v "pkg/types/enums" | grep -v "pkg/handlers/apidocs" | grep -v "pkg/utils/token/mocks" | grep -v "pkg/utils/password/mocks" | grep -v "pkg/handlers/distribution/clients/mocks" | grep -v "pkg/storage/cos"`
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down

0 comments on commit 13dc3f4

Please sign in to comment.