Add lint workflow for GH Actions
This commit is contained in:
parent
ab89553767
commit
7c7b8fbbff
25
.github/workflows/lint.yml
vendored
Normal file
25
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Lint
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Check that code is lint clean using precious
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config --global user.email "jdoe@example.com"
|
||||||
|
git config --global user.name "J. Doe"
|
||||||
|
- name: Run install-dev-tools.sh
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
mkdir $HOME/bin
|
||||||
|
./dev/bin/install-dev-tools.sh
|
||||||
|
- name: Run precious
|
||||||
|
run: |
|
||||||
|
PATH=$PATH:$HOME/bin precious lint -a
|
||||||
@ -11,8 +11,8 @@ function install_tools () {
|
|||||||
curl --silent --location \
|
curl --silent --location \
|
||||||
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh |
|
https://raw.githubusercontent.com/houseabsolute/ubi/master/bootstrap/bootstrap-ubi.sh |
|
||||||
sh
|
sh
|
||||||
run "rustup component add clippy"
|
|
||||||
run "ubi --project houseabsolute/precious --in ~/bin"
|
run "ubi --project houseabsolute/precious --in ~/bin"
|
||||||
|
run "ubi --project houseabsolute/omegasort --in ~/bin"
|
||||||
run "npm install prettier"
|
run "npm install prettier"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user