-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure action for automated testing, update CI/CD (#1)
- Loading branch information
1 parent
fe3127a
commit 3bde922
Showing
3 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test ccinvoice | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Install Dependencies | ||
run: sudo apt-get update && sudo apt-get install wkhtmltopdf | ||
|
||
- name: Set Environment Variables & Test | ||
# This is specifically for generating PDFs - setting this variable means we don't have to run the server to provide the HTML | ||
# response for wkhtmltopdf to create the PDF from. We're only testing the file is created and placed in the right directory, | ||
# so the content doesn't really matter. | ||
run: export BASE_URL=https://duckduckgo.com/?q= && go test -v |