Build and test #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
workflow_dispatch | |
# push: | |
# branches: 'main' | |
# pull_request: | |
# branches: '*' | |
# schedule: | |
# - cron: '42 5 * * 0' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest'] | |
#os: ['ubuntu-latest', 'macos-latest', 'windows-2019'] | |
perl: ['5.34', '5.32', '5.30', '5.28', '5.26'] | |
name: Perl ${{ matrix.perl }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies on Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install libzbar0 | |
- name: Install dependencies on macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew install zbar | |
- name: Run tests (no coverage) | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- run: perl -V | |
- run: cpanm -n --installdeps . | |
- run: pip3 install -r requirements.txt | |
- run: prove -l t | |
- name: Run tests (with coverage) | |
if: ${{ matrix.perl == '5.30' && matrix.os == 'ubuntu-latest' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
perl Makefile.PL | |
cpanm -n Devel::Cover::Report::Coveralls | |
cover -test -report Coveralls |