-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (35 loc) · 906 Bytes
/
ci.yml
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
name: CI
on:
pull_request:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
build:
runs-on: ubuntu-20.04
environment:
name: pypi
url: https://pypi.org/p/pypowsybl2grid
permissions:
id-token: write
steps:
- name: Install Ubuntu packages
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt update
sudo apt -y install maven python3.9 python3.9-dev python3.9-venv pipx
pipx install poetry
- name: Checkout sources
uses: actions/checkout@v4
- name: Install dependencies
run: poetry install
- name: Build wheel
run: poetry build
- name: Run tests
run: poetry run pytest
- name: Publish on PyPi
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1