mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: jq
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- jq/*
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Rust Toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
|
|
# TODO: this step takes ~2m, consider using https://github.com/marketplace/actions/cargo-install
|
|
- name: Install jaq
|
|
run: |
|
|
cargo install --locked --git https://github.com/01mf02/jaq
|
|
|
|
- name: Expect unit test to fail
|
|
working-directory: jq
|
|
run: |
|
|
! ./test-gilded-rose.sh
|
|
|
|
- name: Expect texttest fixture output
|
|
working-directory: jq
|
|
# intentionally fail this step to be in the red
|
|
run: |
|
|
jaq --arg days 9 -nr "$(cat gilded-rose.jq) $(cat texttest_fixture.jq)" |
|
|
diff - texttest-10-day-result
|