Skip to content

Commit

Permalink
Updated the Github workflow to build and run server test
Browse files Browse the repository at this point in the history
Updated the Github workflow so that it builds the server test tool,
server.test before copying it to and runnig it on the remote server.
  • Loading branch information
owenwaller committed Feb 23, 2024
1 parent 3500264 commit bc7303b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/emailformgateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- name: Build emailer test
run: CGO_ENABLED=0 go test -c -o ./emailer.test -run=SendEmail github.com/owenwaller/emailformgateway/emailer

- name: Build server test
run: CGO_ENABLED=0 go test -c -o ./server.test -run=SendEmail github.com/owenwaller/emailformgateway/server

- name: Listing
run: 'ls -al'

Expand Down Expand Up @@ -63,14 +66,18 @@ jobs:

- name: Copy files to server
run: |
scp ./test_envs.sh ./emailer.test ./*.template ./gophercoders-config.toml $TEST_CONFIG_FILE.toml gophercoders.com:
scp ./test_envs.sh ./emailer.test ./server.test ./*.template ./gophercoders-config.toml $TEST_CONFIG_FILE.toml gophercoders.com:
env:
TEST_CONFIG_FILE: ${{ secrets.TEST_CONFIG_FILE }}

- name: Run emailer.test test
run: |
ssh gophercoders.com 'source ./test_envs.sh; TEST_TEMPLATES_DIR=$PWD TEST_DOMAIN=gophercoders.com ./emailer.test'
- name: Run server.test test
run: |
ssh gophercoders.com 'source ./test_envs.sh; TEST_TEMPLATES_DIR=$PWD TEST_DOMAIN=example.com ./server.test'
- name: Delete ssh dir
if: ${{ always() }}
run: |
Expand Down

0 comments on commit bc7303b

Please sign in to comment.