File: main.yml

package info (click to toggle)
xeus-python 0.17.6%2B~0.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,744 kB
  • sloc: cpp: 4,949; python: 370; makefile: 19; javascript: 14
file content (76 lines) | stat: -rw-r--r-- 1,439 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
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Tests

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main
  create:
      tags:
        - '*'

defaults:
  run:
    shell: bash -l {0}

jobs:
  tests:
    runs-on: ${{ matrix.os }}

    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup micromamba
        uses: mamba-org/setup-micromamba@v2
        with:
          environment-name: test-env
          create-args: >-
            python=3.13
            ipython
            black

      - name: Install xeus-python-shell
        run: pip install .

      - name: Test import
        run: python -c "import xeus_python_shell"

      - name: Test black
        run: black xeus_python_shell

  publish-wheels:
    runs-on: ubuntu-latest
    needs: [tests]
    if: ${{ github.event_name == 'create' }}

    steps:

      - name: Checkout
        uses: actions/checkout@v4

      - name: Install Python
        uses: actions/setup-python@v5
        with:
          python-version: 3.13

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install twine wheel build

      - name: Build wheel
        run: python -m build

      - name: Publish wheel
        env:
          TWINE_USERNAME: __token__
          TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
        run: twine upload dist/*