Skip to content

Commit

Permalink
Try coverage on CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 28, 2024
1 parent 723fb22 commit 82743b1
Showing 1 changed file with 83 additions and 19 deletions.
102 changes: 83 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,89 @@
---
# https://github.com/codecov/example-perl
# https://github.com/AtomLinter/atom-linter-perlcritic/blob/master/.circleci/config.yml

machine:
environment:
PATH: ~/perl5/bin:$PATH
AUTOMATED_TESTING: 1
AUTHOR_TESTING: 1
# Couldn't automatically generate a config from your source code.
# This is a generic template to serve as a base for your custom config
# See: https://circleci.com/docs/configuration-reference
# Stacks detected: cicd:github-actions:.github/workflows
version: 2.1
jobs:
machine:
environment:
PATH: ~/perl5/bin:$PATH
AUTOMATED_TESTING: 1
AUTHOR_TESTING: 1

dependencies:
pre:
- curl -L https://cpanmin.us | perl - App::cpanminus
- cpanm --local-lib=~/perl5 local::lib && echo "eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)" >> ~/.bashrc
- cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov
- cpanm -iqn Test::Most Test::Needs
test:
docker:
- image: cimg/base:stable

test:
override:
- perl Makefile.PL
- make
- make test
- cover -test
steps:
- checkout
# Replace this with a real test runner invocation
- run:
name: Install Perl
command: |
sudo apt-get update && \
sudo apt-get upgrade && \
sudo apt-get install --assume-yes --quiet \
--no-install-suggests --no-install-recommends \
perl cpanminus
- run:
name: Perl version
command: perl --version
- run:
name: App::cpanminus version
command: cpanm --version
- run:
name: Install dependencies
command: |
curl -L https://cpanmin.us | perl - App::cpanminus
cpanm --local-lib=~/perl5 local::lib && echo "eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)" >> ~/.bashrc
cpanm --quiet --notest --skip-satisfied Devel::Cover::Report::Codecov
cpanm -iqn Test::Most Test::Needs
cpanm -iqn --installdeps .
- run:
name: Make Module
# command: sudo chown -R circleci . && ls -la && pwd && perl Makefile.PL && make
command: perl Makefile.PL && make
- run:
name: Run tests
# command: echo 'replace me with real tests!' && false
command: |
make test
cover -test
cover -report codecov
post:
- cover -report codecov
# build:
# docker:
# - image: cimg/base:stable
# steps:
# - checkout
# # Replace this with steps to build a package, or executable
# - run:
# name: Build an artifact
# command: touch example.txt
# - store_artifacts:
# path: example.txt
# deploy:
# docker:
# - image: cimg/base:stable
# steps:
# # Replace this with steps to deploy to users
# - run:
# name: deploy
# command: '#e.g. ./deploy.sh'
# - run:
# name: found github actions config
# command: ':'
workflows:
example:
jobs:
- test
# - build:
# requires:
# - test
# - deploy:
# requires:
# - test

0 comments on commit 82743b1

Please sign in to comment.