Skip to content

Commit

Permalink
CICD: refactor pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Tattoo committed Oct 17, 2023
1 parent 3c8ad08 commit 19d85f3
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 10 deletions.
61 changes: 55 additions & 6 deletions .github/workflows/tests-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@ jobs:
- name: "Generate Matrix"
id: generate-matrix
run: |
#echo 'PYTHONS=["3.10.11", "3.11.6", "3.12.0"]' >> $GITHUB_OUTPUT
#echo 'RF_VERSIONS=["3.2.2", "4.1.3", "5.0.1", "6.1.1"]' >> $GITHUB_OUTPUT
echo 'PYTHONS=["3.10.11"]' >> $GITHUB_OUTPUT
echo 'RF_VERSIONS=["6.1.1"]' >> $GITHUB_OUTPUT
echo 'PYTHONS=["3.10.11", "3.11.6", "3.12.0"]' >> $GITHUB_OUTPUT
echo 'RF_VERSIONS=["3.2.2", "4.1.3", "5.0.1", "6.1.1"]' >> $GITHUB_OUTPUT
windows:
runs-on: windows-latest
needs:
- generate-matrix
strategy:
fail-fast: false
matrix:
python: ${{ fromJSON(needs.generate-matrix.outputs.python-versions) }}
rf-version: ${{ fromJSON(needs.generate-matrix.outputs.rf-versions) }}
runs-on: windows-latest
name: Windows (${{ matrix.python }}, robotframework-${{ matrix.rf-version }})
steps:
- name: Checkout the repository
Expand All @@ -48,3 +45,55 @@ jobs:
- name: Run tests
run: |
invoke test
macos:
runs-on: macos-latest
needs:
- generate-matrix
strategy:
fail-fast: false
matrix:
python: ${{ fromJSON(needs.generate-matrix.outputs.python-versions) }}
rf-version: ${{ fromJSON(needs.generate-matrix.outputs.rf-versions) }}
name: MacOS (${{ matrix.python }}, robotframework-${{ matrix.rf-version }})
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install robotframework==${{ matrix.rf-version }}
- name: Run tests
run: |
invoke test
linux:
runs-on: ubuntu-latest
needs:
- generate-matrix
strategy:
fail-fast: false
matrix:
python: ${{ fromJSON(needs.generate-matrix.outputs.python-versions) }}
rf-version: ${{ fromJSON(needs.generate-matrix.outputs.rf-versions) }}
name: Linux (${{ matrix.python }}, robotframework-${{ matrix.rf-version }})
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install robotframework==${{ matrix.rf-version }}
- name: Run tests
run: |
invoke test
7 changes: 3 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,13 @@ def coverage(context, in_nix=False):
'single string. E.g: invoke atest --rf "--name my_suite"'
})
def atest(context, rf=''):
cmd = (f'robot '
run(f'robot '
f'--pythonpath {str(SRCPATH)} '
f'--dotted '
f'{rf} '
f'--listener oxygen.listener '
f'{str(CURDIR / "tests" / "atest")}')
print(cmd)
run(cmd, pty=(not system() == 'Windows'))
f'{str(CURDIR / "tests" / "atest")}',
pty=(not system() == 'Windows'))

@task(help={
'in_nix': IN_NIX_HELP
Expand Down

0 comments on commit 19d85f3

Please sign in to comment.