|
1 | | -# Built from: |
2 | | -# https://docs.github.com/en/actions/guides/building-and-testing-python |
3 | | -# https://github.com/snok/install-poetry#workflows-and-tips |
4 | | - |
5 | 1 | name: Build and test linkml-model |
6 | 2 |
|
7 | 3 | on: |
| 4 | + push: |
| 5 | + branches: [ main ] |
8 | 6 | pull_request: |
9 | | - branches: [main] |
10 | | - types: [opened, synchronize, reopened] |
| 7 | + workflow_dispatch: |
11 | 8 |
|
12 | 9 | jobs: |
13 | 10 | test: |
14 | | - runs-on: ubuntu-latest |
15 | | - |
16 | 11 | strategy: |
| 12 | + fail-fast: false |
17 | 13 | matrix: |
| 14 | + os: [ubuntu-latest, windows-latest] |
18 | 15 | python-version: ["3.9", "3.10"] |
19 | | - |
| 16 | + runs-on: ${{ matrix.os }} |
20 | 17 | steps: |
21 | | - #---------------------------------------------- |
22 | | - # check-out repo and set-up python |
23 | | - #---------------------------------------------- |
24 | 18 | - name: Check out repository |
25 | 19 | |
26 | 20 | with: |
27 | 21 | fetch-depth: 0 |
28 | 22 |
|
29 | | - #---------------------------------------------- |
30 | | - # install & configure poetry |
31 | | - #---------------------------------------------- |
32 | | - - name: Install Poetry |
33 | | - run: | |
34 | | - pipx install poetry |
35 | | - pipx inject poetry poetry-dynamic-versioning |
36 | | -
|
37 | 23 | - name: Set up Python ${{ matrix.python-version }} |
38 | 24 | |
39 | 25 | with: |
40 | 26 | python-version: ${{ matrix.python-version }} |
41 | 27 | cache: "poetry" |
42 | 28 |
|
43 | | - #---------------------------------------------- |
44 | | - # install dependencies |
45 | | - #---------------------------------------------- |
| 29 | + - name: Install Poetry |
| 30 | + run: | |
| 31 | + pipx install poetry |
| 32 | + pipx inject poetry poetry-dynamic-versioning |
| 33 | +
|
46 | 34 | - name: Install dependencies |
47 | | - run: poetry install --no-interaction --all-extras --no-root |
| 35 | + run: poetry install --no-interaction --no-root |
48 | 36 |
|
49 | | - #---------------------------------------------- |
50 | | - # run test suite |
51 | | - #---------------------------------------------- |
52 | 37 | - name: Run tests |
53 | 38 | run: make test |
0 commit comments