msg word tokenizer returned to default; leave as ENV var. #42
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: build app | |
on: | |
push: | |
branches-ignore: | |
- main | |
- master | |
tags: | |
- 'v*' | |
jobs: | |
test_code: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Install dependencies" | |
run: |- | |
sudo apt -y update && sudo apt -y install pandoc gettext | |
- uses: actions/checkout@v4 | |
- name: "Set up Go" | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: "Build app" | |
env: | |
GOFLAGS: -p=2 | |
run: |- | |
go build -v ./... | |
- name: "Run tests" | |
env: | |
TEST_NAME: "Unit Tests" | |
run: |- | |
TESTS_OK=1 | |
set +e | |
set -o pipefail | |
go test ./... 2>&1 | tee test-results.txt | |
S=$? #non-0 means error | |
if [ $S -eq 0 ]; then | |
R="Test(s) Passed: ${TEST_NAME}" | |
echo "::notice::$R" | |
R=":white_check_mark: $R" | |
else | |
R="Test(s) '${TEST_NAME}' failed" | |
echo "::error::$R" | |
R=":x: $R" | |
TESTS_OK=0 | |
fi | |
set -e | |
echo "### ${R}" >> $GITHUB_STEP_SUMMARY | |
echo '---' >> $GITHUB_STEP_SUMMARY | |
echo '```shell' >> $GITHUB_STEP_SUMMARY | |
cat test-results.txt >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
if [[ "${TESTS_OK}" == "0" ]]; then | |
exit 1 | |
fi | |
tag-branch: | |
needs: [test_code] | |
uses: ./.github/workflows/util-tag-branch.yml | |
secrets: inherit |