Add GitHub Actions Go workflow #1
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
| # This workflow will build a golang project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
| name: Go | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out hebcal/learning | |
| uses: actions/checkout@v4 | |
| with: | |
| path: learning | |
| # The go.mod replace directive points at ../hebcal-go, so check out | |
| # hebcal-go as a sibling directory until the dailylearning package is | |
| # available in a tagged hebcal-go release. | |
| - name: Check out hebcal/hebcal-go | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: hebcal/hebcal-go | |
| path: hebcal-go | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.17 | |
| - name: Build | |
| working-directory: learning | |
| run: go build -v ./... | |
| - name: Test | |
| working-directory: learning | |
| run: go test -v ./... |