Fix GitHub actions for frontend
This commit is contained in:
@@ -3,8 +3,8 @@ name: Frontend CI
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
- '.github/workflows/frontend.yml'
|
||||
- '*'
|
||||
- '.github/workflows/frontend.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -15,25 +15,25 @@ jobs:
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: get yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: yarn install, build, and test
|
||||
run: |
|
||||
yarn install
|
||||
yarn build
|
||||
yarn test
|
||||
env:
|
||||
CI: true
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: get yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: yarn install, build, and test
|
||||
run: |
|
||||
yarn install
|
||||
yarn build
|
||||
yarn test
|
||||
env:
|
||||
CI: true
|
||||
|
||||
@@ -3,27 +3,27 @@ name: Inventory CI
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'backend/inventory/**'
|
||||
- '.github/workflows/inventory.yml'
|
||||
- 'backend/inventory/**'
|
||||
- '.github/workflows/inventory.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: setup env
|
||||
run: |
|
||||
echo "::set-env name=GOPATH::$(go env GOPATH)"
|
||||
echo "::add-path::$(go env GOPATH)/bin"
|
||||
shell: bash
|
||||
- name: build
|
||||
run: go build -v ./...
|
||||
working-directory: ./backend/inventory
|
||||
- name: test
|
||||
run: go test ./... -short
|
||||
working-directory: ./backend/inventory
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: setup env
|
||||
run: |
|
||||
echo "::set-env name=GOPATH::$(go env GOPATH)"
|
||||
echo "::add-path::$(go env GOPATH)/bin"
|
||||
shell: bash
|
||||
- name: build
|
||||
run: go build -v ./...
|
||||
working-directory: ./backend/inventory
|
||||
- name: test
|
||||
run: go test ./... -short
|
||||
working-directory: ./backend/inventory
|
||||
|
||||
@@ -3,27 +3,27 @@ name: Scaffolder CI
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'backend/scaffolder/**'
|
||||
- '.github/workflows/scaffolder.yml'
|
||||
- 'backend/scaffolder/**'
|
||||
- '.github/workflows/scaffolder.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: setup env
|
||||
run: |
|
||||
echo "::set-env name=GOPATH::$(go env GOPATH)"
|
||||
echo "::add-path::$(go env GOPATH)/bin"
|
||||
shell: bash
|
||||
- name: build
|
||||
run: go build -v ./...
|
||||
working-directory: ./backend/scaffolder
|
||||
- name: test
|
||||
run: go test ./... -short
|
||||
working-directory: ./backend/scaffolder
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.12
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v1
|
||||
- name: setup env
|
||||
run: |
|
||||
echo "::set-env name=GOPATH::$(go env GOPATH)"
|
||||
echo "::add-path::$(go env GOPATH)/bin"
|
||||
shell: bash
|
||||
- name: build
|
||||
run: go build -v ./...
|
||||
working-directory: ./backend/scaffolder
|
||||
- name: test
|
||||
run: go test ./... -short
|
||||
working-directory: ./backend/scaffolder
|
||||
|
||||
Reference in New Issue
Block a user