-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (80 loc) · 2.12 KB
/
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
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
name: CI
on:
push:
branches:
- main
- release/*
tags:
- v*
pull_request:
branches:
- main
- release/*
jobs:
Linux:
name: Build Linux
strategy:
matrix:
python.version:
- 3.9
runs-on: ubuntu-latest
steps:
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python.version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python.version }}
- uses: actions/checkout@v2
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: Lint
run: python -m flake8 .
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Test
run: python -m pytest
WindowsBuild:
name: Build Windows
strategy:
matrix:
python.version:
- 3.9
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python.version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python.version }}
- uses: actions/checkout@v2
- name: Install dependencies
run: pip3 install -r requirements.txt
- name: Build exe
run: pyinstaller -n datagalaxy-toolbox --onefile --console toolbox/__main__.py
- name: Check datagalaxy-toolbox.exe
run: dist\datagalaxy-toolbox.exe --help
- name: Publish datagalaxy-toolbox
uses: actions/upload-artifact@v2
with:
path: ${{ github.workspace }}/dist/datagalaxy-toolbox.exe
name: datagalaxy-toolbox
if: (success() && startsWith(github.ref, 'refs/tags/v'))
WindowsRun:
name: Run exe on windows
runs-on: windows-2022
needs:
- WindowsBuild
if: (success() && startsWith(github.ref, 'refs/tags/v'))
steps:
- name: Download datagalaxy-toolbox
uses: actions/download-artifact@v2
with:
name: datagalaxy-toolbox
- name: Test
run: ./datagalaxy-toolbox.exe --help
- name: Release
uses: softprops/action-gh-release@v1
with:
files: datagalaxy-toolbox.exe