Skip to content

Commit 6cbda2b

Browse files
committed
Migrate to linux OS
1 parent 2c4c31a commit 6cbda2b

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ on:
1010

1111
jobs:
1212
build:
13-
runs-on: windows-latest
13+
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
1616

1717
- name: Setup Node.js environment
1818
uses: actions/[email protected]
1919
with:
20-
node-version: "15.1.0"
20+
node-version: '14.x'
2121

2222
- name: Get yarn cache directory path
2323
id: yarn-cache-dir-path
@@ -45,4 +45,32 @@ jobs:
4545
run: yarn install --frozen-lockfile
4646

4747
- name: Build and test frontend
48-
run: yarn build
48+
run: yarn build
49+
50+
- name: Check for backend
51+
id: check-for-backend
52+
run: |
53+
if [ -f "Magefile.go" ]
54+
then
55+
echo "::set-output name=has-backend::true"
56+
fi
57+
58+
- name: Setup Go environment
59+
if: steps.check-for-backend.outputs.has-backend == 'true'
60+
uses: actions/setup-go@v2
61+
with:
62+
go-version: '1.15'
63+
64+
- name: Test backend
65+
if: steps.check-for-backend.outputs.has-backend == 'true'
66+
uses: magefile/mage-action@v1
67+
with:
68+
version: latest
69+
args: coverage
70+
71+
- name: Build backend
72+
if: steps.check-for-backend.outputs.has-backend == 'true'
73+
uses: magefile/mage-action@v1
74+
with:
75+
version: latest
76+
args: buildAll

0 commit comments

Comments
 (0)