File: unit_tests_ubuntu.yaml

package info (click to toggle)
python-mcstasscript 0.0.46%2Bgit20260220132321.813e2ef-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,448 kB
  • sloc: python: 13,478; makefile: 14
file content (54 lines) | stat: -rw-r--r-- 1,410 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
name: McStasScript unit tests on ubuntu

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  build:
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10"]
    runs-on: ubuntu-latest
      
    steps:
      - name: Temporary developer McStasScript checkout
        uses: actions/checkout@v3
        with:
          ref: ${{ github.ref }}
          path: mcstasscript
    
      - name: Temporary developer libpyvinyl checkout
        uses: actions/checkout@v3
        with:
          repository: PaNOSC-ViNYL/libpyvinyl
          ref: remove_pint_pin
          path: libpyvinyl
    
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
              
      - name: Install dependencies (libpyvinyl)
        run: |
          cd libpyvinyl
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install -e .
          pip install pytest

      - name: Install dependencies (mcstasscript)
        run: |
          cd mcstasscript
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install -e .
          pip install pytest
        
      - name: Show file structure
        run: tree .

      - name: Run unit tests
        run: python -m pytest mcstasscript/mcstasscript/tests/