Skip to content

.github/workflows/test.yml #2

.github/workflows/test.yml

.github/workflows/test.yml #2

Workflow file for this run

on:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Build dataset
run: |
wget https://www.w3.org/Graphics/SVG/Test/20110816/archives/W3C_SVG_11_TestSuite.tar.gz
mkdir -p svgs/W3C_SVG_11_TestSuite
tar -tf W3C_SVG_11_TestSuite.tar.gz | grep -E '^svg/.+\.svgz?$' > filter.txt
tar -xf W3C_SVG_11_TestSuite.tar.gz -T filter.txt -C svgs/W3C_SVG_11_TestSuite
wget https://download.kde.org/stable/frameworks/5.113/oxygen-icons-5.113.0.tar.xz
tar -tf oxygen-icons-5.113.0.tar.xz | grep -E '\.svgz?$' > filter.txt
tar -xf oxygen-icons-5.113.0.tar.xz -T filter.txt -C svgs
find svgs -name "*.svgz" -exec sh -c '7z e -so {} > $(echo {} | sed s/\.svgz$/\.svg/)' \; -delete
- name: Package artifacts
run: |
mkdir /tmp/dist
tar czf /tmp/dist/svgo-test-suite.tar.gz svgs
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: /tmp/dist
deploy:
needs: test
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2