Another attempt #8
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Build Icon App | |
on: | |
push: | |
branches: master | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
- name: Install requirements | |
run: | | |
pip install -r requirements.txt | |
- run: | | |
pip install pytest pytest-cov | |
python weather_icons.py | |
- run: | |
pytest test_requesting.py --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html | |
- name: Run PyInstaller | |
run: | | |
python -m PyInstaller weather_icons.spec | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: WeatherIconMachine | |
path: dist/WeatherIconMachine.exe | |
- name: create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_number }} | |
release_name: Build ${{ github.run_number }} - ${{ github.event.head_commit.message }} | |
body: ${{ github.event.head_commit.message }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{steps.create_release.outputs.upload_url}} | |
asset_path: dist/WeatherIconMachine.exe | |
asset_name: WeatherIconMachine.exe | |
asset_content_type: application/zip |