generated from microsoft/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (30 loc) · 886 Bytes
/
testing.yml
File metadata and controls
37 lines (30 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Inspired by https://github.com/pyg-team/pytorch_geometric/blob/ee30973ed0957a7f29f345d4eeaf9cfd70805109/.github/workflows/testing.yml
name: Testing
on:
push:
branches:
- main
pull_request:
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
# Only run workflow if certain files have been changed.
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
files: |
.github/workflows/testing.yml
src/**
tests/**
pyproject.toml
- name: Setup packages
if: steps.changed-files.outputs.any_changed == 'true'
uses: ./.github/actions/setup
- name: Run tests
if: steps.changed-files.outputs.any_changed == 'true'
run: |
pytest