grass/.github/workflows/tests.yml

109 lines
2.8 KiB
YAML
Raw Normal View History

2020-05-26 15:46:02 +02:00
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@master
2020-05-26 15:46:02 +02:00
with:
2024-02-06 20:03:57 +01:00
toolchain: "1.70.0"
2020-05-26 15:46:02 +02:00
- name: version info
run: rustc --version; cargo --version;
2020-05-26 15:46:02 +02:00
- name: Run all tests
2023-01-06 10:54:34 +00:00
run: cargo test --features=macro
2020-05-26 15:46:02 +02:00
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@master
2020-05-26 15:46:02 +02:00
with:
2024-02-06 20:03:57 +01:00
toolchain: "1.70.0"
2020-05-26 15:46:02 +02:00
2023-07-09 22:12:12 +00:00
- run: |
2023-07-09 22:16:51 +00:00
rustup component add rustfmt
2023-07-09 22:12:12 +00:00
cargo fmt --all -- --check
2020-05-26 15:46:02 +02:00
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@master
2020-05-26 15:46:02 +02:00
with:
2024-02-06 20:03:57 +01:00
toolchain: "1.70.0"
2020-05-26 15:46:02 +02:00
2023-07-09 22:12:12 +00:00
- run: |
2023-07-09 22:16:51 +00:00
rustup component add clippy
2023-07-09 22:12:12 +00:00
cargo clippy --features=macro -- -D warnings
2021-07-23 23:48:04 -04:00
bootstrap:
2021-07-23 23:48:04 -04:00
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@master
2021-07-23 23:48:04 -04:00
with:
toolchain: stable
- name: Build
run: cargo build
- name: Install dart-sass 1.54.3
2021-07-23 23:48:04 -04:00
run: |
wget https://github.com/sass/dart-sass/releases/download/1.54.3/dart-sass-1.54.3-linux-x64.tar.gz
tar -xzvf dart-sass-1.54.3-linux-x64.tar.gz
2021-07-23 23:48:04 -04:00
- name: Install bootstrap
2021-07-24 00:01:19 -04:00
run: git clone --depth=1 --branch v5.0.2 https://github.com/twbs/bootstrap.git
2021-07-23 23:48:04 -04:00
- name: Verify unchanged output
run: |
./target/debug/grass bootstrap/scss/bootstrap.scss > grass-output.css
./dart-sass/sass bootstrap/scss/bootstrap.scss > dart-sass-output.css
if [[ $(diff -u grass-output.css dart-sass-output.css) ]]; then
echo "Differences found"
diff -u grass-output.css dart-sass-output.css
exit 1
else
echo "No differences found"
fi
# sass-spec:
# continue-on-error: true
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# - uses: dtolnay/rust-toolchain@master
# with:
# toolchain: stable
# - name: version info
# run: rustc --version; cargo --version;
# - name: Build binary
# run: cargo b --release
# - name: Get sass-spec
# run: git submodule init && git submodule update
# - name: Install whatever Ruby needs
# run: |
# sudo apt-get install libncurses5-dev libncursesw5-dev
# sudo gem install bundler
# cd sass-spec && bundler install
# - name: Run Sass spec
# run: ./sass-spec/sass-spec.rb -c './target/release/grass'