Skip to content

GHA: refactor repeating steps in pipeline #186

GHA: refactor repeating steps in pipeline

GHA: refactor repeating steps in pipeline #186

Workflow file for this run

name: Tests simple
on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
python-versions: ${{ steps.generate-matrix.outputs.PYTHONS }}
rf-versions: ${{ steps.generate-matrix.outputs.RF_VERSIONS }}
steps:
- 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
windows:
runs-on: windows-latest
name: Windows
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Run tests
uses: ./.github/workflows/run-tests
with:
- python-version: "3.12.0"

Check failure on line 34 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Tests simple

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 34, Col: 11): A sequence was not expected .github/workflows/test.yml (Line: 47, Col: 11): A sequence was not expected
- rf-version: "6.1.1"
- shell-var: "pwsh"
linux:
runs-on: ubuntu-latest
name: Linux
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Run tests
uses: ./.github/workflows/run-tests
with:
- python-version: "3.12.0"
- rf-version: "6.1.1"
- shell-var: "bash"
# 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) }}
# name: Windows (${{ 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
#
# 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