Skip to content

Linux unit tests

Linux unit tests #1839

Workflow file for this run

name: Linux unit tests
on:
push:
branches: ['main']
tags-ignore: ['**']
pull_request:
schedule:
- cron: '0 2 * * *'
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu]
ruby: [2.7, 3.3, jruby]
node: [18]
java: [17, 21]
python: ['3.x']
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Packages
run: |
sudo apt-get update
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get install -qq haveged \
gconf-service \
libasound2 \
libatk1.0-0 \
libc6 \
libcairo2 \
libcairo-gobject2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgcc1 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgirepository1.0-dev \
libgtk-3-0 \
libnspr4 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
gir1.2-pango-1.0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
ca-certificates \
fonts-liberation \
libappindicator1 \
libnss3 \
lsb-release \
xdg-utils \
curl \
fonts-dejavu \
ttf-mscorefonts-installer \
texlive-science \
texlive-pictures \
cargo \
texlive-latex-extra \
texlive-fonts-extra \
git
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup Golang
uses: actions/setup-go@v5
- name: Setup Go path
run: |
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install pygobject
pip install pycairo
pip install Pillow==9.5.0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Install Graphviz
run: sudo apt-get install -qq graphviz
- name: Install Lilypond
run: sudo apt-get install -qq lilypond
- name: Install AsciitoSVG
run: |
go install github.com/asciitosvg/asciitosvg/cmd/a2s@latest
- name: Install Bytefield-SVG
run: npm install -g bytefield-svg
- name: Install dbml-renderer
run: npm install -g @softwaretechnik/dbml-renderer
- name: Install ERD
run: |
go install github.com/kaishuu0123/erd-go@latest
- name: Install DPIC
run: sudo apt-get install -qq dpic
- name: Install Pikchr
run: |
wget https://pikchr.org/home/tarball/trunk/pikchr.tgz
tar -xf pikchr.tgz
cd pikchr
make
echo "$(pwd)" >> $GITHUB_PATH
- name: Install BPNM-JS
run: npm install -g bpmn-js-cmd
- name: Install Mermaid
run: npm install -g @mermaid-js/mermaid-cli
- name: Install NomNoml
run: npm install -g nomnoml
- name: Install Pintora
run: npm install -g @pintora/cli
- name: Install StateMachineCat
run: npm install -g state-machine-cat
- name: Install Vega
run: |
npm install -g vega-cli
npm install -g install-peerdeps
install-peerdeps -g vega-lite
- name: Install Wavedrom
run: npm install -g wavedrom-cli
- name: Install ImageMagick
run: sudo apt-get install -qq imagemagick
- name: Install Gnuplot
run: sudo apt-get install -qq gnuplot
- name: Cache UMLet
id: cache-umlet
uses: actions/cache@v3
with:
key: umlet-standalone-15.1
path: umlet-standalone-15.1.zip
- name: Download UMLet
if: steps.cache-umlet.outputs.cache-hit != 'true'
run: |
curl -s -O https://www.umlet.com/download/umlet_15_1/umlet-standalone-15.1.zip
- name: Install UMLet
run: |
unzip -qq umlet-standalone-15.1.zip
cp Umlet/umlet.sh Umlet/umlet
chmod +x Umlet/umlet
echo "$PWD/Umlet" >> $GITHUB_PATH
- name: Install MSCgen
run: npm install --global mscgenjs-cli
- name: Install Blockdiag
run: pip install blockdiag[pdf] actdiag seqdiag nwdiag[pdf]
- name: Install svgbob
run: |
cargo install svgbob_cli
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# - name: Install Syntrax
# run: pip install syntrax
# - name: Install Symbolator
# run: pip install symbolator
- name: Install Diagrams
run: pip install diagrams
- name: Install d2
run: |
go install oss.terrastruct.com/d2@latest
- name: Cache Structurizr
id: cache-structurizr
uses: actions/cache@v3
with:
key: structurizr-cli-1.35.0
path: structurizr-cli-1.35.0.zip
- name: Download Structurizr
if: steps.cache-structurizr.outputs.cache-hit != 'true'
run: |
curl -s -O -L https://github.com/structurizr/cli/releases/download/v1.35.0/structurizr-cli-1.35.0.zip
- name: Install Structurizr
run: |
mkdir structurizr
cd structurizr
unzip -qq ../structurizr-cli-1.35.0.zip
echo "DIAGRAM_STRUCTURIZRCLI_HOME=$PWD" >> $GITHUB_ENV
- name: Install Wavedrom
run: npm install -g wavedrom-cli
- name: Run tests
run: bundle exec rake test
env:
BLOCKDIAG_FONTPATH: /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf