Skip to content

ci: Fix test CI

ci: Fix test CI #67

Workflow file for this run

name: Test
on: [push, pull_request]
jobs:
ci:
name: "Test"
strategy:
matrix:
go-version: ["1.20.x"]
node-version: [20.x]
os: ["windows-latest", "ubuntu-latest"]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: benjlevesque/short-sha@v3.0
name: Set short git commit SHA
id: short-sha
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Node deps
run: npm i -g husky typescript
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go get .
- name: Test with Go & Output
run: go test ./cmd ./cmd/init ./cmd/install -json > TestResults-${{ matrix.go-version }}-${{ matrix.os }}-${{ env.SHA }}.json
env:
test: true
FOLDCLI_MONGO_URI: ${{ secrets.FOLDCLI_MONGO_URI }}
FOLDCLI_DB_NAME: foldcli-testing
- name: Upload Go test results
uses: actions/upload-artifact@v3
if: always()
with:
name: Go-results-${{ matrix.go-version }}-${{ matrix.os }}-${{ env.SHA }}
path: TestResults-${{ matrix.go-version }}-${{ matrix.os }}-${{ env.SHA }}.json