File: main.yml

package info (click to toggle)
xeus-python 0.17.2%2B~0.6.3-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,752 kB
  • sloc: cpp: 4,890; python: 369; makefile: 18; javascript: 14
file content (79 lines) | stat: -rw-r--r-- 1,578 bytes parent folder | download | duplicates (2)
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
77
78
79
name: Tests

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

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

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

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

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

      - name: Setup conda
        uses: conda-incubator/setup-miniconda@v2
        with:
          python-version: ${{ matrix.python-version }}
          mamba-version: "*"
          auto-activate-base: false
          channels: conda-forge

      - name: Install dependencies
        run: mamba install ipython=7 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@v2

      - name: Install Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9

      - 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/*