Bump docker/build-push-action from 2 to 5 #1780
Workflow file for this run
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: test | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
docker: | |
runs-on: ubuntu-22.04 | |
name: Docker | |
steps: | |
- uses: actions/checkout@v4 | |
- name: docker build | |
run: docker build . --target test -t metacpan/metacpan-web:latest | |
- name: run Perl tests | |
run: > | |
docker run -i metacpan/metacpan-web | |
carton exec prove -lr --jobs 2 t | |
test: | |
runs-on: ubuntu-20.04 | |
name: Dockerless | |
strategy: | |
fail-fast: false | |
matrix: | |
perl-version: | |
- "5.30" | |
resolver: | |
- snapshot | |
- metacpan | |
container: | |
image: perl:${{ matrix.perl-version }} | |
env: | |
DEVEL_COVER_OPTIONS: "-ignore,^local/" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
- run: npm install | |
- run: apt-get update && apt-get -y install libcmark-dev | |
- name: Install Carton | |
uses: perl-actions/install-with-cpm@stable | |
with: | |
install: Carton | |
sudo: false | |
- name: Install CPAN deps | |
uses: perl-actions/install-with-cpm@stable | |
with: | |
cpanfile: "cpanfile" | |
sudo: false | |
args: > | |
--resolver ${{ matrix.resolver }} | |
--show-build-log-on-failure | |
--local-lib-contained=local | |
- name: Build assets | |
run: npm run build | |
- name: Run tests without coverage | |
if: matrix.resolver != 'snapshot' | |
run: carton exec prove -lr --jobs 2 t | |
env: | |
TEST_TIDYALL_VERBOSE: 1 | |
- name: Install Codecovbash | |
if: matrix.resolver == 'snapshot' | |
uses: perl-actions/install-with-cpm@stable | |
with: | |
install: | | |
Devel::Cover | |
Devel::Cover::Report::Codecov | |
Devel::Cover::Report::Codecovbash | |
sudo: false | |
- name: Run tests with coverage | |
if: matrix.resolver == 'snapshot' | |
run: carton exec prove -lr --jobs 2 t | |
env: | |
HARNESS_PERL_SWITCHES: -MDevel::Cover=+ignore,^t/ | |
- name: Upload coverage reports to Codecov | |
if: matrix.resolver == 'snapshot' | |
run: cover -report codecov | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |