Skip to content

Commit

Permalink
upadte [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jul 7, 2024
2 parents df8e30e + e401a73 commit cba4be0
Show file tree
Hide file tree
Showing 143 changed files with 4,458 additions and 933 deletions.
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ flags:
cctp-relayer:
paths:
- services/cctp-relayer/
carryforward: true
rfq:
paths:
- services/rfq/
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/add-label/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
shell: bash

- name: Add Label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/remove-label/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
shell: bash

- name: Remove Label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
async function removeLabel() {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/close-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
stale-prs:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-pr-message: 'This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
exempt-pr-labels: exempt-stale
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
- name: Install Go
if: ${{ matrix.language == 'go' }}
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version-file: 'go.work'

Expand All @@ -42,7 +42,7 @@ jobs:

- name: Go modules cache
if: ${{ matrix.language == 'go' }}
uses: actions/cache@v3
uses: actions/cache@v4
with:
# see https://github.com/mvdan/github-actions-golang
path: |
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
# see https://github.com/mvdan/github-actions-golang
# also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night)
Expand All @@ -125,7 +125,7 @@ jobs:
${{ runner.os }}-test-${{matrix.package}}
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

Expand Down Expand Up @@ -259,14 +259,14 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
# see https://github.com/mvdan/github-actions-golang
# also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night)
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
# e.g. ['package1', 'package2'] if both package folders contains changes
package: ${{ fromJSON(needs.changes.outputs.packages_nodeps) }}
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.x

Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand All @@ -396,12 +396,12 @@ jobs:
run: npx lerna exec npm run build:go --parallel

# Setup Go
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.x

- name: Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
# see https://github.com/mvdan/github-actions-golang
# also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night)
Expand Down Expand Up @@ -474,7 +474,7 @@ jobs:
- uses: actions/checkout@v4
if: ${{ contains(fromJson(needs.pr_metadata.outputs.labels), format('needs-go-generate-{0}', matrix.package)) }}
with:
fetch-depth: 1
fetch-depth: 2
- name: Remove Label
if: ${{ contains(fromJson(needs.pr_metadata.outputs.labels), format('needs-go-generate-{0}', matrix.package)) }}
uses: ./.github/actions/remove-label
Expand All @@ -496,7 +496,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand All @@ -519,12 +519,12 @@ jobs:
if: ${{ contains(matrix.package, 'agents') || contains(matrix.package, 'services/rfq') }}

# Setup Go
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.x

- name: Go modules cache
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ !contains(matrix.package, 'services/cctp-relayer') }}
with:
# see https://github.com/mvdan/github-actions-golang
Expand All @@ -541,7 +541,7 @@ jobs:
${{ runner.os }}-go-generate-${{matrix.package}}
- name: Cache Linuxbrew
uses: actions/cache@v3
uses: actions/cache@v4
if: ${{ contains(matrix.package, 'scribe') }}
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
submodules: 'recursive'

- name: Set up cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
with:
version: v3.9.2

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.7

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lerna.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: 'Version and publish' # Interesting step
env:
GH_TOKEN: ${{ secrets.LERNA_FGPAT }}
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

# branch is protected so this must be an admin token, this will expire on 03/01/2024
# replacement should be done by a service account with a fine-grained personal access token
run: |
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand All @@ -40,6 +40,7 @@ jobs:

- name: Run tests # Run tests of all packages
run: npx lerna exec npm run ci:lint --parallel

test:
runs-on: ubuntu-latest
env:
Expand All @@ -49,12 +50,18 @@ jobs:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs

# Foundry is required for build
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Verify Changed files
uses: tj-actions/[email protected]
id: verify-yarn-lock
Expand Down Expand Up @@ -97,3 +104,9 @@ jobs:
files: lcov.info
attempt_limit: 5
attempt_delay: 30000

- name: Run build # Run tests of all packages
run: npx lerna exec npm run build --parallel || true # only for codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
2 changes: 1 addition & 1 deletion .github/workflows/solidity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
if: ${{ matrix.package != 'solidity-devops' }}
uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 2
submodules: 'recursive'

- name: Setup NodeJS
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ui-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,18 @@ jobs:
export DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_ENV
echo "::set-output name=url::$DEPLOY_URL"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
- name: Deploy to Vercel (Output Prod)
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref }}
run: |
vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
vercel build --token=${{ secrets.VERCEL_TOKEN }} --prod
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} --prod
env:
CODECOV_TOKEN: ${{ secrets.CODECOV }}
GH_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

- name: Update PR Description
if: ${{ github.event_name == 'pull_request' && format('refs/heads/{0}', github.event.repository.default_branch) != github.ref }}
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,3 +285,7 @@ func TestEventDBSuite(t *testing.T) {
}

```

## Github Actions

If you want to do a shallow clone, use `fetch-depth: 2` rather than `fetch-depth: 1`. This allows [some actions](https://docs.codecov.com/docs/environment-specific-requirements) (though not all of them) to determine the correct sha.
Loading

0 comments on commit cba4be0

Please sign in to comment.