회사들 리스트 조회 api 추가 & 테스트 db config설정 #53
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: build test before PR to main | |
permissions: | |
pull-requests: write | |
on: | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.4 | |
- name: Build file | |
run: go build ./cmd/main.go | |
- name: install go-ctrf-json-reporter | |
run: go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest | |
- name: Test with the Go CLI | |
run: go test ./... -json > test-report.json | |
- name: create ctrf-report.json | |
run: cat test-report.json | go-ctrf-json-reporter -output ctrf-report.json | |
if: always() | |
- name: Upload test report | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ctrf-report | |
path: ctrf-report.json | |
report: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: always() | |
steps: | |
- name: Download test report | |
uses: actions/download-artifact@v4 | |
with: | |
name: ctrf-report | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Publish CTRF pull request comment | |
run: npx github-actions-ctrf pull-request ctrf-report.json | |
if: always() | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: annotate test result | |
run: npx github-actions-ctrf annotate ctrf-report.json |