-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (53 loc) · 1.47 KB
/
push.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
name: Push and PR to main
on:
push:
paths:
- '.github/workflows/push.yml'
- 'cube_provider/**'
- 'tests/**'
- 'setup.py'
- 'LICENSE'
- 'README.md'
branches:
- 'main'
pull_request:
paths:
- '.github/workflows/push.yml'
- 'cube_provider/**'
- 'tests/**'
- 'setup.py'
- 'LICENSE'
- 'README.md'
jobs:
build:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
node-version: '3.10'
- name: Upgrade "pip"
run: python3 -m pip install --upgrade pip
- name: Upgrade "black"
run: python3 -m pip install --upgrade black
- name: Upgrade "build"
run: python3 -m pip install --upgrade build
- name: Upgrade "twine"
run: python3 -m pip install --upgrade twine
- name: Upgrade "pytest"
run: python3 -m pip install --upgrade pytest
- name: Upgrade "requests-mock"
run: python3 -m pip install --upgrade requests-mock
- name: Instal package locally
run: pip install -e .
- name: Run black
run: black .
- name: Run CubeHook unit tests
run: pytest -s tests/hooks/test_cube_hook.py
- name: Run CubeOperators unit tests
run: pytest -s tests/operators/test_cube_operator.py
- name: Build package
run: python3 -m build