ci: Update to the latest action version #68
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: 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@v4 | |
if: always() | |
with: | |
name: Go-results-${{ matrix.go-version }}-${{ matrix.os }}-${{ env.SHA }} | |
path: TestResults-${{ matrix.go-version }}-${{ matrix.os }}-${{ env.SHA }}.json |