-
-
Notifications
You must be signed in to change notification settings - Fork 31
39 lines (39 loc) · 995 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
name: CI
on:
push:
branches:
- main
tags-ignore:
- '**'
paths:
- '.github/workflows/CI.yml'
- 'python_weather/**/*.py'
pull_request: null
jobs:
ci:
if: "!contains(github.event.head_commit.message, 'skip ci')"
name: Run test.py and pretty files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.7'
architecture: 'x64'
- name: Install dependencies
run: python3 -m pip install .
- name: Run test
run: python3 test.py
- name: Install yapf
run: |
python3 -m pip install toml
python3 -m pip install yapf
- name: Pretty files
run: |
python3 -m yapf -i -r python_weather
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'style: prettier'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}