Skip to content

Commit 33353c5

Browse files
committed
ci: add workflows2
1 parent 43b531a commit 33353c5

File tree

4 files changed

+14
-43
lines changed

4 files changed

+14
-43
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111

1212
steps:
13-
- name: Checkout code
13+
- name: 01. Checkout code
1414
uses: actions/checkout@v4
1515

16-
- name: Set up Python
16+
- name: 02. Set up Python
1717
uses: actions/setup-python@v4
1818
with:
1919
python-version: '3.12'
2020

21-
- name: Install dependencies
21+
- name: 03. Install dependencies
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install -r requirements.txt
2525
pip install pyinstaller
2626
27-
- name: Build executable
27+
- name: 04. Build executable
2828
run: |
2929
if [[ "${{ runner.os }}" == "Windows" ]]; then
3030
pyinstaller --onefile --name myapp-${{ runner.os }}.exe src/app.py

.github/workflows/pylint.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ jobs:
1111
matrix:
1212
python-version: ["3.8", "3.9", "3.10"]
1313
steps:
14-
- uses: actions/checkout@v4
15-
- name: Set up Python ${{ matrix.python-version }}
14+
- name: 01. Project checkout
15+
uses: actions/checkout@v4
16+
17+
- name: 02. Set up Python ${{ matrix.python-version }}
1618
uses: actions/setup-python@v3
1719
with:
1820
python-version: ${{ matrix.python-version }}
19-
- name: Install dependencies
21+
22+
- name: 03. Install dependencies
2023
run: |
2124
python -m pip install --upgrade pip
2225
pip install pylint
26+
2327
- name: Analysing the code with pylint
2428
run: |
2529
pylint $(git ls-files '*.py')

.github/workflows/python-package-conda.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ conda 24.9.2
2525
python -m venv .venv
2626
.\.venv\Scripts\activate
2727
pip install -r .\requirements.txt # pip freeze > requirements.txt
28+
29+
# 如果是第二种情况且你用conda且项目有 environment.yml,也可以这样:
30+
conda env update --file environment.yml --name base # conda env export > environment.yml
2831
```
2932

3033
编译/运行

0 commit comments

Comments
 (0)