backup #19
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: Go Test | |
on: | |
push: | |
# only trigger on branches, not on tags | |
branches: '**' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.22' | |
- name: Install Calibre | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y calibre | |
- name: Ensure ebook-convert is in PATH | |
run: | | |
echo "$(dirname $(which ebook-convert)) is in PATH" | |
ebook-convert --version # This will fail if ebook-convert is not installed correctly | |
- name: Install ffmpeg | |
run: | | |
sudo apt-get install -y ffmpeg | |
# run with p 1 to prevent concurrent tests mutating the same file | |
# unfortunately we have to do this since ebook-convert requires tmp files and not stdin/stdout | |
- name: Run Go tests | |
run: go test ./... -p 1 -count=1 |