You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.6 KiB

name: Sargraph tests
on:
push:
pull_request:
branches: [main]
jobs:
readme-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -qqy --no-install-recommends python3 python3-pip git colorized-logs
sudo pip3 install git+https://github.com/antmicro/tuttest.git
git clone https://github.com/antmicro/wrap-vt100.git
cd wrap-vt100
cargo build --release
sudo mv target/release/wrap-vt100 /usr/bin/wrap-vt100
- name: Run README.md snippets
run: |
sudo ./scripts/test.sh
cat plot.ascii | ansi2txt
cat plot.ascii | wrap-vt100
echo -en '## Sargraph summary\n\n' >> $GITHUB_STEP_SUMMARY
echo -en '```\n' >> $GITHUB_STEP_SUMMARY
cat plot.ascii | ansi2txt >> $GITHUB_STEP_SUMMARY
echo -en '\n```\n' >> $GITHUB_STEP_SUMMARY
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: sargraph-sample-graphs
path: |
plot.svg
plot.png
plot.ascii
plot.html
example.txt
example.log