File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # This workflow will install Python dependencies, run tests and lint with a single version of Python
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+ name : Python github action test
5+
6+ on :
7+ push :
8+ branches : [ "master" ]
9+ pull_request :
10+ branches : [ "master" ]
11+
12+ jobs :
13+ test :
14+
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ # step1 : checkout the code from the repository
19+ - name : checkout code
20+ uses : actions/checkout@v4
21+
22+ # Step2: set up python environment
23+ - name : Set up Python 3.10
24+ uses : actions/setup-python@v3
25+ with :
26+ python-version : " 3.10"
27+
28+ - name : Install dependencies
29+ run : |
30+ python -m pip install --upgrade pip
31+ pip install -r requirements.txt
32+
33+ - name : Test with pytest
34+ run : |
35+ pytest
You can’t perform that action at this time.
0 commit comments