Skip to content

Silence rsync pull failures for absent remote sources #3274

Silence rsync pull failures for absent remote sources

Silence rsync pull failures for absent remote sources #3274

Workflow file for this run

name: PR Tests
on: [pull_request]
jobs:
is_source_changed:
name: Check if sources has changed
runs-on: ubuntu-22.04
outputs:
is_source_changed: ${{steps.check_source_change.outputs.changed}}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Check if any source changed
id: check_source_change
uses: ./.github/actions/files-changed
with:
paths: |
.github/*
examples/*
testplan/*
tests/*
scripts/*
pytest.ini
pyproject.toml
setup.py
requirements.txt
success:
name: PR Test Completed
needs: [is_source_changed, test]
runs-on: ubuntu-22.04
if: always() && needs.is_source_changed.result == 'success' && (needs.is_source_changed.outputs.is_source_changed == 'false' || needs.Test.result == 'success')
steps:
- run: echo ${{needs.is_source_changed.result}} ${{needs.is_source_changed.outputs.is_source_changed}} ${{needs.Test.result}}
- run: true
lint_python:
name: Run lint on python code
needs: [is_source_changed]
runs-on: ubuntu-22.04
if: needs.is_source_changed.outputs.is_source_changed == 'true'
env:
LINT_PYTHON_VERSION: "3.10"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.LINT_PYTHON_VERSION }}
- name: Set up uv & Python
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ env.LINT_PYTHON_VERSION }}
- name: Setup
run: |
sudo apt-get install -y libkrb5-dev
uv pip install --system . --group dev -c constraints.txt
- name: Lint
run: doit lint
build_ui:
name: Build UI (with test and lint)
needs: [is_source_changed]
runs-on: ubuntu-22.04
if: needs.is_source_changed.outputs.is_source_changed == 'true'
env:
REACT_APP_API_BASE_URL: "/fake/api/endpoint"
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
- name: Set up uv & Python
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: '3.11'
- name: Set up Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
- name: Set up PNPM
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 11.1.2
- name: Setup
run: uv pip install --system doit
- name: Build
run: |
doit lint_ui
CI=false doit build_ui
doit test_ui
- name: Archive ui artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ui_bundle
path: testplan/web_ui/testing/build
retention-days: 1
test:
name: Test
needs: [lint_python, build_ui]
runs-on: ${{ matrix.os }}
env:
CI: ""
strategy:
matrix:
os: [ubuntu-22.04, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
package-extras: ['', '[all]']
exclude:
- os: windows-latest
package-extras: ''
- os: ubuntu-22.04
python-version: '3.10'
package-extras: '[all]'
- os: ubuntu-22.04
python-version: '3.11'
package-extras: '[all]'
fail-fast: false
steps:
- run: echo "BUILD ${{ matrix.os }} ${{ matrix.python-version }} ${{needs.is_source_changed.outputs.is_source_changed}}"
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv & Python
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
python-version: ${{ matrix.python-version }}
- name: Download ui bundle
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ui_bundle
path: testplan/web_ui/testing/build
- name: Set up Linux package for tests
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get install -y libkrb5-dev
- name: Set up Zookeeper for tests
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get -y install zookeeper zookeeper-bin zookeeperd
- name: Set up Kafka for tests
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
wget https://archive.apache.org/dist/kafka/3.9.2/kafka_2.13-3.9.2.tgz -O kafka.tgz
sudo mkdir /opt/kafka
sudo chown -R $USER:$USER /opt/kafka
tar zxf kafka.tgz -C /opt/kafka --strip-components 1
- name: Install Python dependencies
run: uv pip install --system .${{ matrix.package-extras }} --group test -c constraints.txt
- name: Test Python
run: doit test