-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (85 loc) · 2.31 KB
/
actions.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
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
80
81
82
83
84
85
86
87
name: Push latest
on:
push:
branches:
- develop
jobs:
build-image:
name: Build Docker image 🐋
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
tags: islasgeci/dummy_transformations:latest
outputs: type=docker,dest=/tmp/image.tar
- name: Upload artifact
uses: actions/upload-artifact@main
with:
name: image
path: /tmp/image.tar
test-module:
name: Test Python module 🐍
needs: build-image
runs-on: ubuntu-latest
steps:
- name: Copia repositorio
uses: actions/checkout@main
- name: Download artifact
uses: actions/download-artifact@main
with:
name: image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/image.tar
docker image ls -a
- name: Verifica el formato
run: docker run islasgeci/dummy_transformations:latest make check
- name: Corre pruebas y evalúa cobertura
run: docker run --volume $PWD:/workdir islasgeci/dummy_transformations:latest make coverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@main
with:
files: ./coverage.xml
verbose: true
- name: Create/Update tag
uses: rickstaa/[email protected]
with:
tag: "latest"
message: "Latest release"
force_push_tag: true
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
needs: test-module
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python 3.X
uses: actions/setup-python@main
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
skip-existing: true