Skip to content

Commit b596811

Browse files
committed
add test as the separate stage
1 parent 709f781 commit b596811

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,17 @@ name: Gitconvex build deploy
33
on: push
44

55
jobs:
6+
gitconvex-test:
7+
name: Gitconvex test
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Run Go Test
11+
run: |
12+
go test -v ./...
13+
614
# Build for Ubuntu Linux
715
build-linux:
16+
needs: gitconvex-test
817
runs-on: ubuntu-latest
918
steps:
1019
- name: Set up Go 1.x
@@ -42,11 +51,6 @@ jobs:
4251
run: |
4352
echo "# gitconvex GoLang project" > /home/runner/work/gitconvex/gitconvex/README.md
4453
45-
- name: Run test cases
46-
run: |
47-
git config --global user.name "${{ secrets.USER_NAME }}" && git config --global user.email "${{ secrets.USER_EMAIL }}"
48-
export GOTESTENV=ci && gotestsum --format=testname ./...
49-
5054
- name: Package gitconvex bundle
5155
run: |
5256
make build
@@ -64,6 +68,7 @@ jobs:
6468
6569
# Build for MacOS
6670
build-macos:
71+
needs: gitconvex-test
6772
runs-on: macos-latest
6873
steps:
6974
- name: Install brew
@@ -99,6 +104,7 @@ jobs:
99104
100105
# Test Build for Windows
101106
build-windows:
107+
needs: gitconvex-test
102108
runs-on: windows-latest
103109
defaults:
104110
run:

0 commit comments

Comments
 (0)