Skip to content

Merge pull request #638 from xmos/xross-patch-2 #459

Merge pull request #638 from xmos/xross-patch-2

Merge pull request #638 from xmos/xross-patch-2 #459

Workflow file for this run

# YAML schema for GitHub Actions:
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
#
# Helpful YAML parser to clarify YAML syntax:
# https://yaml-online-parser.appspot.com/
#
# This workflow uses actions that are not certified by GitHub. They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support documentation.
#
# This file contains the workflows that are run prior to merging a pull request.
# This workflow will be triggered when a PR modifies some python relevant files
name: Python
on:
push:
branches:
- 'main'
- 'develop'
pull_request:
branches:
- 'main'
- 'develop'
# Allow manually triggering of the workflow.
workflow_dispatch: {}
jobs:
changes:
runs-on: ubuntu-latest
name: Change detection
# Set job outputs to values from filter step
outputs:
python_install: ${{ steps.filter.outputs.python_install }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Paths filter
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
python_install:
- 'tools/install/requirements.txt'
- '**.py'
python_install:
runs-on: ubuntu-latest
needs: changes
name: Install & verify Python packages
if: ${{ needs.changes.outputs.python_install == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install packages
run: |
python -m pip install --upgrade pip
pip install -r tools/install/requirements.txt
- name: Verify install
run: |
python test/verify_python_install.py