feat/services-logic used constants #72
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: Check test | |
on: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
NODE_VERSION: 16 | |
jobs: | |
api-test: | |
name: API Test | |
runs-on: ubuntu-latest | |
services: | |
dind: | |
image: docker:23.0-rc-dind-rootless | |
ports: | |
- 2375:2375 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get files that have changed | |
id: changed-files | |
uses: tj-actions/changed-files@v39 | |
with: | |
files_yaml: | | |
api: | |
- api/** | |
base_sha: ${{ github.event.pull_request.base.sha }} | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
if: steps.changed-files.outputs.api_modified_files_count > '0' | |
with: | |
go-version: '1.20' | |
- name: Test | |
if: steps.changed-files.outputs.api_modified_files_count > '0' | |
working-directory: api | |
run: go test -v ./... | |
front-test: | |
name: Front Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@v2 | |
- name: Get files that have changed | |
id: changed-files | |
uses: tj-actions/changed-files@v39 | |
with: | |
files_yaml: | | |
front: | |
- front/** | |
base_sha: ${{ github.event.pull_request.base.sha }} | |
- name: Install NodeJS | |
uses: actions/setup-node@v2 | |
if: steps.changed-files.outputs.test_any_changed == 'true' | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
if: steps.changed-files.outputs.test_any_changed == 'true' | |
working-directory: front | |
run: yarn install | |
- name: Code Testing | |
if: steps.changed-files.outputs.test_any_changed == 'true' | |
working-directory: front | |
run: yarn test |