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

Upgrading upload-artifact to v3 #421

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 52 additions & 52 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
- release-**
env:
TYK_IB_STORAGE_STORAGETYPE: file

permissions:
contents: read

jobs:
golangci-lint:
runs-on: ubuntu-latest
Expand All @@ -32,15 +32,15 @@ jobs:
with:
version: latest
args: --out-format=checkstyle:golanglint.xml --timeout=600s --max-issues-per-linter=0 --max-same-issues=0 --new-from-rev=origin/${{ github.base_ref }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: golangcilint
retention-days: 1
path: |
golanglint.xml

ci-test:
name: '${{ matrix.databases }}'
name: "${{ matrix.databases }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -52,41 +52,41 @@ jobs:
redis-version: [5]
mongodb-version: [4.2]
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '^1.21'
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "^1.21"

- name: Install Dependencies and basic hygiene test
id: hygiene
run: |
go install golang.org/x/tools/cmd/goimports@latest

- name: Install Dependencies and basic hygiene test
id: hygiene
run: |
go install golang.org/x/tools/cmd/goimports@latest

- name: Start Redis
uses: supercharge/[email protected]
with:
- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: ${{ matrix.redis-version }}

- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: '${{ matrix.mongodb-version }}'
- name: Run tests
run: |
./bin/ci-tests.sh ${{ matrix.databases }}
- uses: actions/upload-artifact@v2
with:
name: coverage
retention-days: 1
path: |
*cov
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: "${{ matrix.mongodb-version }}"

- name: Run tests
run: |
./bin/ci-tests.sh ${{ matrix.databases }}
- uses: actions/upload-artifact@v3
with:
name: coverage
retention-days: 1
path: |
*cov

sonar-cloud-analysis:
runs-on: ubuntu-latest
needs: [ci-test, golangci-lint]
Expand All @@ -103,38 +103,38 @@ jobs:
with:
go-version: 1.21
- name: Download coverage artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: coverage
- name: Download golangcilint artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: golangcilint
- name: Check reports existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: '*.cov, golanglint.xml'
files: "*.cov, golanglint.xml"
- name: Install Dependencies
run: >
go install github.com/wadey/gocovmerge@latest

- name: merge reports
run: |
./bin/merge-cov.sh
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=tyktechnologies
-Dsonar.projectKey=TykTechnologies_tyk-identity-broker
-Dsonar.sources=.
-Dsonar.exclusions=ci/**
-Dsonar.coverage.exclusions=**/*_test.go,**/mocks/*.go
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.tests=.
-Dsonar.go.coverage.reportPaths=*.cov
-Dsonar.go.golangci-lint.reportPaths=golanglint.xml
args: >
-Dsonar.organization=tyktechnologies
-Dsonar.projectKey=TykTechnologies_tyk-identity-broker
-Dsonar.sources=.
-Dsonar.exclusions=ci/**
-Dsonar.coverage.exclusions=**/*_test.go,**/mocks/*.go
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.tests=.
-Dsonar.go.coverage.reportPaths=*.cov
-Dsonar.go.golangci-lint.reportPaths=golanglint.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Loading