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 c943012
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
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: ${{ python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install robotframework==${{ rf-version }}
- name: Run tests
run: |
invoke test
13 changes: 3 additions & 10 deletions .github/workflows/tests-simple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,8 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
- name: "Run tests"
uses: ./.github/workflows
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
rf-version: ${{ matrix.rf-version }}
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 c943012

Please sign in to comment.