File: testing_minimal.yml

package info (click to toggle)
pytorch-geometric 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,172 kB
  • sloc: python: 144,911; sh: 247; cpp: 27; makefile: 18; javascript: 16
file content (63 lines) | stat: -rw-r--r-- 1,962 bytes parent folder | download
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Testing minimal PyTorch

on:  # yamllint disable-line rule:truthy
  push:
    branches:
      - master
  pull_request:

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ startsWith(github.ref, 'refs/pull/') || github.run_number }}  # yamllint disable-line
  # Only cancel intermediate builds if on a PR:
  cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:

  minimal_pytest:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v5
        with:
          fetch-depth: 40

      # Skip workflow if only certain files have been changed.
      - name: Get changed files
        id: changed-files-specific
        uses: tj-actions/changed-files@v47
        with:
          files: |
            benchmark/**
            conda/**
            docker/**
            docs/**
            examples/**
            graphgym/**
            README.md
            CHANGELOG.md

      - name: Setup packages
        if: steps.changed-files-specific.outputs.only_changed != 'true'
        uses: ./.github/actions/setup
        with:
          full_install: false

      - name: Install main package
        if: steps.changed-files-specific.outputs.only_changed != 'true'
        run: |
          uv pip install -e ".[test]"

      - name: Check installation
        if: steps.changed-files-specific.outputs.only_changed != 'true'
        run: |
          uv run --no-project python -c "import torch; print('PyTorch:', torch.__version__)"
          uv run --no-project python -c "import torch; print('CUDA available:', torch.cuda.is_available())"
          uv run --no-project python -c "import torch; print('CUDA:', torch.version.cuda)"
        shell: bash

      - name: Run tests
        if: steps.changed-files-specific.outputs.only_changed != 'true'
        timeout-minutes: 15
        run: |
          uv run --no-project pytest --durations 10