Ensure we only build the emailer package in the emailer.test tool #5
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: Email_Form_Gateway_Build_Test_And_Deploy | |
on: [push, pull_request] | |
jobs: | |
deploy: | |
name: "Deploy to senpaid" | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download and install go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.0' | |
- name: Print Go version | |
run: go version | |
- name: Run tests | |
run: CGO_ENABLED=0 go test -skip=SendEmail github.com/owenwaller/emailformgateway/... | |
- name: Build emailer test | |
run: CGO_ENABLED=0 go test -c -o ./emailer.test -run=SendEmail github.com/owenwaller/emailformgateway/emailer | |
- name: Listing | |
run: 'ls -al' |