Add more checks
- python code formatting is tested with yapf - cron workflow to run cargo audit - Don't run on latest
This commit is contained in:
24
.github/workflows/cargo_audit.yml
vendored
Normal file
24
.github/workflows/cargo_audit.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Security audit
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
jobs:
|
||||
audit:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: thumbv7em-none-eabi
|
||||
override: true
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python dependencies
|
||||
run: python -m pip install --upgrade pip setuptools wheel
|
||||
- name: Set up OpenSK
|
||||
run: ./setup.sh
|
||||
- uses: actions-rs/audit-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
2
.github/workflows/cargo_check.yml
vendored
2
.github/workflows/cargo_check.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
cargo_check:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
2
.github/workflows/cargo_fmt.yml
vendored
2
.github/workflows/cargo_fmt.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
|
||||
jobs:
|
||||
cargo_format:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
|
||||
3
.github/workflows/mdlint.yml
vendored
3
.github/workflows/mdlint.yml
vendored
@@ -10,11 +10,12 @@ on:
|
||||
|
||||
jobs:
|
||||
mdlint:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: markdownlint-cli
|
||||
uses: nosborn/github-action-markdown-cli@v1.1.1
|
||||
with:
|
||||
files: '**/*.md'
|
||||
ignore_files: "third_party/*"
|
||||
config_file: ".markdownlint.json"
|
||||
|
||||
@@ -9,7 +9,7 @@ on:
|
||||
types: [opened, synchronize, reopened]
|
||||
jobs:
|
||||
pylint:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8]
|
||||
@@ -26,4 +26,19 @@ jobs:
|
||||
- name: Test code with pylint
|
||||
run: |
|
||||
pip install pylint
|
||||
pylint --rcfile=.pylintrc `find . -maxdepth 1 -type f -name '*.py'`
|
||||
pylint --rcfile=.pylintrc --score=n `find . ! -path "./third_party/*" -type f -name '*.py'`
|
||||
|
||||
yapf:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip setuptools wheel
|
||||
pip install yapf
|
||||
- name: Test code formatting with yapf
|
||||
run: yapf --style=chromium --recursive --exclude third_party --diff .
|
||||
Reference in New Issue
Block a user