diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-09-13 23:09:06 +0200 |
|---|---|---|
| committer | Federico Caselli <cfederico87@gmail.com> | 2021-10-23 11:11:48 +0200 |
| commit | a1d70afb5974125a1a65f590418c7c371bbdb3e6 (patch) | |
| tree | 0f4d4ef4170e963aa6784a222e192d16ba753e21 /.github | |
| parent | 09cf4f68a7f7f63c2f249d61d7cc6600afe12c1a (diff) | |
| download | mako-workflow_test_initial_1_2.tar.gz | |
Modernize codeworkflow_test_initial_1_2
- remove python 2 support
- add github workflows
- remove disable unicode
- cleanup compat file
- modernize setup
- use pep517
Change-Id: Ic38dbf478046cec5d0815b468f0c235b4ea5e20c
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/run-on-pr.yaml | 43 | ||||
| -rw-r--r-- | .github/workflows/run-test.yaml | 51 |
2 files changed, 94 insertions, 0 deletions
diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml new file mode 100644 index 0000000..e263b5b --- /dev/null +++ b/.github/workflows/run-on-pr.yaml @@ -0,0 +1,43 @@ +name: Run tests on a pr + +on: + # run on pull request to master excluding changes that are only on doc or example folders + pull_request: + branches: + - master + paths-ignore: + - "doc/**" + +jobs: + run-test: + name: ${{ matrix.python-version }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + # run this job using this matrix + matrix: + os: + - "ubuntu-latest" + python-version: + - "3.9" + + fail-fast: false + + # steps to run in each job. Some are github actions, others run shell commands + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade tox setuptools + pip list + + - name: Run tests + run: tox
\ No newline at end of file diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml new file mode 100644 index 0000000..79f846d --- /dev/null +++ b/.github/workflows/run-test.yaml @@ -0,0 +1,51 @@ +name: Run tests + +on: + # run on push in master or rel_* branches excluding changes are only on doc or example folders + push: + branches: + - master + - "rel_*" + # branches used to test the workflow + - "workflow_test_*" + paths-ignore: + - "docs/**" + +jobs: + run-test: + name: ${{ matrix.python-version }}-${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + # run this job using this matrix + matrix: + os: + - "ubuntu-latest" + - "windows-latest" + - "macos-latest" + python-version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + + fail-fast: false + + # steps to run in each job. Some are github actions, others run shell commands + steps: + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install --upgrade tox setuptools + pip list + + - name: Run tests + run: tox |
