Skip to content

Update github actions workflows to use upload-artifact@v4. #2814

Update github actions workflows to use upload-artifact@v4.

Update github actions workflows to use upload-artifact@v4. #2814

name: Tests - RobotFramework Language Server (robotframework-ls)
on:
push:
paths:
- robotframework-ls/**
- robocorp-python-ls-core/**
- .github/**
pull_request:
paths:
- robotframework-ls/**
- robocorp-python-ls-core/**
- .github/**
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [
"windows-py311-pip-v3",
"ubuntu-py310-pip-v5", # RF5 Must be with 3.10 due to a test using the `|` union operator.
"ubuntu-py38-pip-v6",
"ubuntu-py39-master",
# "ubuntu-pypy3-master",
"macos-py311",
]
include:
- name: "windows-py311-pip-v3"
python: "3.11"
os: windows-latest
- name: "ubuntu-py310-pip-v5"
python: "3.10"
os: ubuntu-latest
- name: "ubuntu-py38-pip-v6"
python: "3.8"
os: ubuntu-latest
- name: "ubuntu-py39-master"
python: "3.9"
os: ubuntu-latest
# - name: "ubuntu-pypy3-master"
# python: "pypy3"
# os: ubuntu-latest
# Github actions seems to be having issues with Mac (regardless of which is the last action it may not complete)
# so, leave it commented out for now.
# See:
# https://github.saobby.my.eu.orgmunity/t5/GitHub-Actions/Jobs-on-Mac-OS-failing-on-Complete-Job/m-p/52401
# https://github.saobby.my.eu.orgmunity/t5/GitHub-Actions/Jobs-on-macOS-latest-sometimes-gets-cancelled-An-error-occurred/td-p/44124
- name: "macos-py311"
python: "3.11"
os: macos-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install robotframework from master
run: python -W ignore -m pip install https://github.com/robotframework/robotframework/archive/master.zip --no-warn-script-location --disable-pip-version-check
if: contains(matrix.name, '-master')
- name: Install robotframework from pip
run: python -W ignore -m pip install "robotframework>=3.2,<4.0"
if: contains(matrix.name, '-pip-v3')
- name: Install robotframework from pip
run: python -W ignore -m pip install "robotframework>=5.0,<6.0"
if: contains(matrix.name, '-pip-v5')
- name: Install robotframework from pip
run: python -W ignore -m pip install "robotframework>=6.0,<7.0"
if: contains(matrix.name, '-pip-v6')
- name: Install robotremoteserver via pip
run: python -W ignore -m pip install robotremoteserver
- name: Vendor deps
working-directory: ./robotframework-ls
run: |
pip install fire
python -m dev vendor-robocorp-ls-core
python -m dev vendor-robotframework-interactive
python -m dev vendor-robotframework-output-stream
- name: setup.py install
working-directory: ./robotframework-ls
run: |
cd src
python setup.py install
cd ..
- name: Install test deps
working-directory: ./robotframework-ls
run: |
cd tests
pip install -r test_requirements.txt
cd ..
- name: Test
working-directory: ./robotframework-ls/tests
env:
PYTHONPATH: .
RUN_TESTS_TIMEOUT: 800
run: python -u ../../robocorp-python-ls-core/tests/run_tests.py -rfE -otests_output -vv .
- uses: actions/upload-artifact@v4
with:
name: tests_output.${{ matrix.name }}.txt
path: robotframework-ls/tests/tests_output