fix: PDF tests data file loading and Chrome installation in CI
- Add findDataFile() helper to search up directory tree for data files - Fixes tests running from subdirectories (internal/handlers) - Install Chrome in GitHub Actions for PDF generation tests This resolves test failures that have existed since PDF tests were introduced: - Error: 'open data/cv-es.json: no such file or directory' - Error: 'chrome failed to start' Tests now properly locate data files from any working directory and have Chrome available for PDF generation in CI environment.
This commit is contained in:
@@ -30,6 +30,13 @@ jobs:
|
||||
- name: Verify dependencies
|
||||
run: go mod verify
|
||||
|
||||
- name: Install Chrome for PDF tests
|
||||
run: |
|
||||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
|
||||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y google-chrome-stable
|
||||
|
||||
- name: Run linter
|
||||
uses: golangci/golangci-lint-action@v7
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user