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- name : Test
1+ name : Install package
22
3- # Controls when the action will run. Triggers the workflow on push or pull request
4- # events but only for the master branch
53on :
6- push :
7- branches : [ main ]
8- pull_request :
9- branches : [ main ]
4+ workflow_call :
105
11- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
126jobs :
13- # This workflow contains a single job called "build"
14- build :
15- # The type of runner that the job will run on
7+ install :
168 runs-on : ubuntu-22.04
179 strategy :
1810 matrix :
1911 python-version : [ "3.10" ]
2012 poetry-version : [ "1.6.1" ]
21-
22- # Steps represent a sequence of tasks that will be executed as part of the job
2313 steps :
24- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2514 - name : Checkout repository
2615 uses : actions/checkout@v3
2716 with :
3120 uses : actions/setup-python@v2
3221 with :
3322 python-version : ${{ matrix.python-version }}
23+
3424 - name : Set up Poetry ${{ matrix.poetry-version }}
3525 uses : abatilo/actions-poetry@v2.0.0
3626 with :
4939
5040 - name : Install dependencies
5141 run : |
52- poetry install -E percep
53- # - name: Lint with flake8
54- # run: |
55- # # stop the build if there are Python syntax errors or undefined names
56- # poetry run flake8 ./avstack --count --max-line-length=127 --show-source --statistics
57- - name : Run tests
58- run : |
59- poetry run pytest tests
42+ poetry install -E percep
Original file line number Diff line number Diff line change 1+ name : Run unit tests
2+
3+ on :
4+ workflow_call :
5+
6+ jobs :
7+ install :
8+ uses : install.yml
9+ test :
10+ steps :
11+ # - name: Lint with flake8
12+ # run: |
13+ # # stop the build if there are Python syntax errors or undefined names
14+ # poetry run flake8 ./avstack --count --max-line-length=127 --show-source --statistics
15+ - name : Run tests
16+ run : |
17+ poetry run pytest tests
Original file line number Diff line number Diff line change 1+ name : Run tests on main branch
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ install :
11+ uses : install.yml
12+ test :
13+ uses : test.yml
Original file line number Diff line number Diff line change 1+ name : Run tests on workflows branch
2+
3+ on :
4+ push :
5+ branches : [ workflows ]
6+ pull_request :
7+ branches : [ workflows ]
8+
9+ jobs :
10+ install :
11+ uses : install.yml
12+ test :
13+ uses : test.yml
You can’t perform that action at this time.
0 commit comments