Skip to content

Bump MINOR version for new version #71

Bump MINOR version for new version

Bump MINOR version for new version #71

name: Automated testing
on: push
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
# Install required software packages.
# Also add the new directory to PATH.
# Reference: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
- name: Install dependencies
run: |
# ImageMagick.
# AppImages require FUSE version 2 to run.
# Reference: https://github.com/AppImage/AppImageKit/wiki/FUSE
sudo add-apt-repository universe
sudo apt install libfuse2
mkdir -p "$HOME/.local/bin"
curl -O 'https://imagemagick.org/archive/binaries/magick'
chmod u+x magick
mv magick "$HOME/.local/bin"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
# FFmpeg.
sudo apt install -y ffmpeg
- name: Check dependencies
run: |
magick -version
ffmpeg -version
# Build
- name: Install dependencies (build)
run: npm clean-install
- name: Clean environment
run: npm run clean
- name: Build project for testing
run: npm run build-test
# Test
- name: Install dependencies (test)
run: npm clean-install
working-directory: ./dist
- name: Run test cases
run: npm run test
working-directory: ./dist
test-windows:
runs-on: windows-latest
strategy:
matrix:
node-version: [16, 18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
# Install required software packages.
# The PATH environment variable is not updated after installing ImageMagick,
# so running refreshenv is required. However, due to unknown reasons,
# running refreshenv doesn't work as expected (the command is supposed to
# run on PowerShell but the refreshenv tries to update the environment
# variables for cmd.exe). To workaround the problem, install the Chocolatey
# PowerShell profile first.
# References: https://docs.chocolatey.org/en-us/troubleshooting#refreshenv-has-no-effect
- name: Install dependencies
run: |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
choco install imagemagick ffmpeg
refreshenv
Write-Output "$env:PATH" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Check dependencies
run: |
magick -version
ffmpeg -version
# Build
- name: Install dependencies (build)
run: npm clean-install
- name: Clean environment
run: npm run clean
- name: Build project for testing
run: npm run build-test
# Test
- name: Install dependencies (test)
run: npm clean-install
working-directory: ./dist
- name: Run test cases
run: npm run test
working-directory: ./dist