feat: added import of State of Mind and Symptoms #82
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| metadata: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| go_version: ${{ steps.go_version.outputs.GO_VERSION }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine Go version from go.mod | |
| id: go_version | |
| run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_OUTPUT | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: metadata | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: ${{ needs.metadata.outputs.go_version }} | |
| - name: Run linters | |
| uses: golangci/golangci-lint-action@v2 | |
| test: | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.platform }} | |
| needs: metadata | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Go | |
| uses: actions/setup-go@v3 | |
| with: | |
| go-version: ${{ needs.metadata.outputs.go_version }} | |
| - name: Run tests | |
| run: go test -v -coverprofile=coverage.txt -covermode=count ./... | |
| - name: Push code coverage to Codecov | |
| uses: codecov/codecov-action@v2 | |
| # Push code coverage only for one of the environments | |
| if: matrix.platform == 'ubuntu-latest' | |
| with: | |
| files: ./coverage.txt |