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 1352af1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Run tests'
inputs:
python-version:
required: true
rf-version:
required: true
runs:
using: 'composite'
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
- name: Install dependencies
shell: bash
run: |
invoke install --package=robotframework==${{ inputs.rf-version }}
- name: Run tests
shell: bash
run: |
invoke test
3 changes: 1 addition & 2 deletions .github/workflows/tests-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install robotframework==${{ matrix.rf-version }}
invoke install --package=robotframework==${{ inputs.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 1352af1

Please sign in to comment.