mirror of https://github.com/Wilfred/difftastic/
38 lines
827 B
YAML
38 lines
827 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
- name: Install dependencies
|
|
run: npm install
|
|
- name: Generate parser
|
|
run: npm run generate
|
|
- name: Verify that generated parser matches the repository
|
|
run: |
|
|
diff=`git diff HEAD -- src`
|
|
echo "$diff"
|
|
test -z "$diff"
|
|
- name: Run tests
|
|
run: npm test
|
|
- name: Set up Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
- name: Build and test crate
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|