mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Split Python linting into separate jobs.
This is just the first step to prove the concept. Most of the work done in our workflows can be split into separate jobs to parallelize the workflow. This will also make the checks page more readable. This change alone probably won't speed up CI much.
This commit is contained in:
parent
2bd39bd9f5
commit
07ac8957c8
13
.github/workflows/black.yml
vendored
13
.github/workflows/black.yml
vendored
@ -1,13 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
- uses: psf/black@stable
|
|
||||||
with:
|
|
||||||
args: ". --check"
|
|
||||||
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -3,6 +3,9 @@ name: Build
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
uses: ./.github/workflows/lint.yml
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
@ -16,9 +19,6 @@ jobs:
|
|||||||
- name: Set up JS environment
|
- name: Set up JS environment
|
||||||
uses: ./.github/actions/setup-liberation-js
|
uses: ./.github/actions/setup-liberation-js
|
||||||
|
|
||||||
- name: mypy
|
|
||||||
uses: ./.github/actions/mypy
|
|
||||||
|
|
||||||
- name: Set build number
|
- name: Set build number
|
||||||
run: |
|
run: |
|
||||||
[IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER)
|
[IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER)
|
||||||
|
|||||||
28
.github/workflows/lint.yml
vendored
Normal file
28
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
name: Python lint
|
||||||
|
|
||||||
|
on: workflow_call
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
black:
|
||||||
|
name: Black
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
- uses: psf/black@stable
|
||||||
|
with:
|
||||||
|
args: ". --check"
|
||||||
|
|
||||||
|
mypy:
|
||||||
|
name: Type checking
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Set up Python environment
|
||||||
|
uses: ./.github/actions/setup-liberation-python
|
||||||
|
|
||||||
|
- name: mypy
|
||||||
|
uses: ./.github/actions/mypy
|
||||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@ -5,6 +5,9 @@ on:
|
|||||||
tags: ["*"]
|
tags: ["*"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
uses: ./.github/workflows/lint.yml
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
@ -18,9 +21,6 @@ jobs:
|
|||||||
- name: Set up JS environment
|
- name: Set up JS environment
|
||||||
uses: ./.github/actions/setup-liberation-js
|
uses: ./.github/actions/setup-liberation-js
|
||||||
|
|
||||||
- name: mypy
|
|
||||||
uses: ./.github/actions/mypy
|
|
||||||
|
|
||||||
- name: Finalize build
|
- name: Finalize build
|
||||||
run: |
|
run: |
|
||||||
New-Item -ItemType file resources\final
|
New-Item -ItemType file resources\final
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user