add unit tests for Dataset #250
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch name' | |
required: true | |
default: 'main' | |
jobs: | |
unit-tests: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.22' | |
- name: Yarn install | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: install | |
dir: 'frontend' | |
- name: Yarn build | |
uses: borales/actions-yarn@v4 | |
with: | |
cmd: build | |
dir: 'frontend' | |
- name: Install dependencies | |
run: | | |
echo "Installing dependencies ..." | |
go mod tidy | |
- name: Run Go unit tests | |
run: | | |
echo "Running go unit tests ..." | |
go test -v -cover ./... | |
- name: Run Vue unit tests | |
run: | | |
echo "Running vue unit tests ..." | |
cd 'frontend' | |
yarn test |