Skip to content

Commit

Permalink
chore: use single gomod (#3289)
Browse files Browse the repository at this point in the history
  • Loading branch information
schoren committed Oct 25, 2023
1 parent 0b4e213 commit ee479bf
Show file tree
Hide file tree
Showing 62 changed files with 378 additions and 5,517 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-demo.yml
Expand Up @@ -68,9 +68,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.work
cache-dependency-path: go.mod
- uses: actions/download-artifact@v3
with:
name: tracetest-web
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-main.yml
Expand Up @@ -25,9 +25,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.work
cache-dependency-path: go.mod
- name: install graph tool
run: |
mkdir /tmp/go-arch
Expand Down Expand Up @@ -100,9 +100,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.work
cache-dependency-path: go.mod
- shell: bash
run: |
echo "sha_short=$(git rev-parse --short=8 $GITHUB_SHA)" >> $GITHUB_ENV
Expand Down Expand Up @@ -158,9 +158,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.work
cache-dependency-path: go.mod

- shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docusaurus.yml
Expand Up @@ -25,9 +25,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: 'go.mod'
cache: true
cache-dependency-path: go.work
cache-dependency-path: go.mod
# Node is required for npm
- name: Set up Node
uses: actions/setup-node@v2
Expand Down
92 changes: 49 additions & 43 deletions .github/workflows/pull-request.yaml
Expand Up @@ -21,39 +21,39 @@ env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

jobs:
backend-arch-graph:
name: Generate backend architecture graph
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.work"
cache: true
cache-dependency-path: go.work
- name: install graph tool
run: |
mkdir /tmp/go-arch
cd /tmp/go-arch
curl -SLO https://github.com/mathnogueira/golang-arch-viewer/archive/refs/heads/master.zip
unzip master.zip
cd golang-arch-viewer-master
make
mv dist/go-arch /tmp/go-arch/go-arch
- name: generate graph
run: |
cd server
mkdir -p ../dist/
/tmp/go-arch/go-arch -o ../dist/architecture.png
- name: Upload assets
uses: actions/upload-artifact@v3
with:
name: architecture-graph
path: dist/architecture.png
# backend-arch-graph:
# name: Generate backend architecture graph
# runs-on: ubuntu-latest
# continue-on-error: true
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Setup go
# uses: actions/setup-go@v3
# with:
# go-version-file: "go.mod"
# cache: true
# cache-dependency-path: go.mod
# - name: install graph tool
# run: |
# mkdir /tmp/go-arch
# cd /tmp/go-arch
# curl -SLO https://github.com/mathnogueira/golang-arch-viewer/archive/refs/heads/master.zip
# unzip master.zip
# cd golang-arch-viewer-master
# make
# mv dist/go-arch /tmp/go-arch/go-arch
# - name: generate graph
# run: |
# cd server
# mkdir -p ../dist/
# /tmp/go-arch/go-arch -o ../dist/architecture.png
# - name: Upload assets
# uses: actions/upload-artifact@v3
# with:
# name: architecture-graph
# path: dist/architecture.png

unit-test-cli:
name: CLI unit tests
Expand All @@ -67,9 +67,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.work"
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.work
cache-dependency-path: "go.mod"
- name: Run unit tests
run: cd cli; make test

Expand All @@ -86,9 +86,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.work"
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.work
cache-dependency-path: "go.mod"
- name: Run unit tests
run: cd server; make test -B

Expand All @@ -104,9 +104,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.work"
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.work
cache-dependency-path: "go.mod"
- name: Run unit tests
run: cd agent; make test -B

Expand Down Expand Up @@ -201,9 +201,9 @@ jobs:
if: steps.cache-docker-build.outputs.cache-hit != 'true'
uses: actions/setup-go@v3
with:
go-version-file: "go.work"
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.work
cache-dependency-path: "go.mod"
- uses: goreleaser/goreleaser-action@v4
if: steps.cache-docker-build.outputs.cache-hit != 'true'
with:
Expand Down Expand Up @@ -345,6 +345,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
cache: true
cache-dependency-path: "go.mod"
- uses: actions/download-artifact@v3
with:
name: tracetest-dist
Expand Down Expand Up @@ -379,9 +385,9 @@ jobs:
# - name: Setup go
# uses: actions/setup-go@v3
# with:
# go-version-file: "go.work"
# go-version-file: "go.mod"
# cache: true
# cache-dependency-path: go.work
# cache-dependency-path: "go.mod"
# - uses: actions/download-artifact@v3
# with:
# name: tracetest-dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-candidate.yml
Expand Up @@ -68,9 +68,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.work
cache-dependency-path: "go.mod"

- uses: actions/download-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-version.yml
Expand Up @@ -79,9 +79,9 @@ jobs:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version-file: 'go.work'
go-version-file: "go.mod"
cache: true
cache-dependency-path: go.work
cache-dependency-path: "go.mod"

- uses: actions/download-artifact@v3
with:
Expand Down
5 changes: 1 addition & 4 deletions .goreleaser.demo.yaml
Expand Up @@ -10,10 +10,7 @@ release:
disable: true
before:
hooks:
- dir: ./server
cmd: go mod tidy
- dir: ./cli
cmd: go mod tidy
- go mod tidy
env:
- VERSION={{ if index .Env "VERSION" }}{{ .Env.VERSION }}{{ else }}dev{{ end }}
- TRACETEST_ENV={{ if index .Env "TRACETEST_ENV" }}{{ .Env.TRACETEST_ENV }}{{ else }}dev{{ end }}
Expand Down
5 changes: 1 addition & 4 deletions .goreleaser.dev.yaml
Expand Up @@ -10,10 +10,7 @@ release:
disable: true
before:
hooks:
- dir: ./server
cmd: go mod tidy
- dir: ./cli
cmd: go mod tidy
- go mod tidy
env:
- VERSION={{ if index .Env "VERSION" }}{{ .Env.VERSION }}{{ else }}dev{{ end }}
# if TAG is defined, use it. Fallback to VERSION
Expand Down
5 changes: 1 addition & 4 deletions .goreleaser.rc.yaml
Expand Up @@ -12,10 +12,7 @@ release:
prerelease: "true"
before:
hooks:
- dir: ./server
cmd: go mod tidy
- dir: ./cli
cmd: go mod tidy
- go mod tidy
env:
- VERSION={{ if index .Env "VERSION" }}{{ .Env.VERSION }}{{ else }}dev{{ end }}
- TRACETEST_ENV={{ if index .Env "TRACETEST_ENV" }}{{ .Env.TRACETEST_ENV }}{{ else }}dev{{ end }}
Expand Down
5 changes: 1 addition & 4 deletions .goreleaser.yaml
Expand Up @@ -14,10 +14,7 @@ release:
# - glob: ./dist/architecture.png
before:
hooks:
- dir: ./server
cmd: go mod tidy
- dir: ./cli
cmd: go mod tidy
- go mod tidy
env:
- VERSION={{ if index .Env "VERSION" }}{{ .Env.VERSION }}{{ else }}dev{{ end }}
- TRACETEST_ENV={{ if index .Env "TRACETEST_ENV" }}{{ .Env.TRACETEST_ENV }}{{ else }}dev{{ end }}
Expand Down

0 comments on commit ee479bf

Please sign in to comment.