Bump werkzeug from 2.0.0 to 3.0.1 in /solutions/python-helloworld #54
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
## Named of the workflow. | |
name: Pytest | |
## Set the trigger policy. | |
## In this case, the workflow is execute on a `push` event, | |
## or when a new commit is pushed to the repository | |
on: [push] | |
## List the steps to be executed by the workflow | |
jobs: | |
## Set the name of the job | |
build: | |
## Configure the operating system the workflow should run on. | |
## In this case, the job on Ubuntu. Additionally, set a the job | |
## to execute on different Python versions | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [2.7, 3.5, 3.6, 3.7, 3.8] | |
## Define a sequence of steps to be executed | |
steps: | |
## Use the public `checkout` action in version v2 | |
## to checkout the existing code in the repository | |
- uses: actions/checkout@v2 | |
## Use the public `setup-python` actoin in version v2 | |
## to install python on the Ubuntu based environment. | |
## Additionally, it ensures to loop through all | |
## the defined Python versions. | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
## Install all necessary dependecies . | |
## For example, pytest and any defined packages within the requirements.txt file. | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
## Run all pytests by inovking the `pytest command` | |
- name: Test with pytest | |
run: | | |
pytest |