tasks: add lint tasks: lint, format, mypy #33
Workflow file for this run
This file contains hidden or 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
| # NOTE: In contrast to Linux and macOS, the Windows build machines do not have Chrome installed. | |
| name: "HTML2PDF on Windows" | |
| on: | |
| pull_request: | |
| branches: [ "**" ] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Google Chrome | |
| run: | | |
| choco install googlechrome --no-progress -y | |
| shell: powershell | |
| - name: Check Chrome Version | |
| run: '& "C:\Program Files\Google\Chrome\Application\chrome.exe" --version' | |
| shell: powershell | |
| - name: Add Chrome to PATH | |
| run: | | |
| $chromePath = "C:\Program Files\Google\Chrome\Application" | |
| echo "Adding $chromePath to PATH" | |
| echo "$chromePath" | Out-File -Append -Encoding utf8 $env:GITHUB_PATH | |
| shell: powershell | |
| - name: Verify Chrome Installation | |
| run: chrome --version | |
| shell: powershell | |
| - name: Upgrade pip | |
| run: | | |
| python -m pip install --upgrade pip | |
| - name: Install minimal Python packages | |
| run: | | |
| pip install -r requirements.development.txt | |
| - name: Clone HTML2PDF.js | |
| run: | | |
| invoke bootstrap | |
| - name: Install HPDF dependencies. | |
| run: | | |
| python developer/pip_install_hpdf_deps.py | |
| - name: Run Lint tasks | |
| run: | | |
| invoke lint | |
| - name: Build HTML2PDF.js | |
| run: | | |
| invoke build | |
| - name: Run tests (Bash) | |
| run: | | |
| invoke test | |
| shell: bash |