Skip to content

Commit

Permalink
feat: Add GLPI Agent CI action to test on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Dec 18, 2019
1 parent 664bdcb commit ec4cd86
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/glpi-agent-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: GLPI Agent CI

on: [push]

jobs:
linux-ubuntu-test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Install cpanminus
run: |
sudo apt -y install cpanminus libmodule-install-perl
- name: Check environement
run: |
perl --version
cpanm --version
- name: Install deps
run: |
cpanm --sudo --installdeps --verbose --notest .
cpanm --sudo --verbose --notest Parse::EDID
cpanm --sudo --verbose --notest Test::Perl::Critic Test::Vars Test::Pod Test::Pod::Spelling::CommonMistakes Test::Whitespaces Test::CPAN::Meta
- name: Run make
run: |
perl Makefile.PL
make manifest
make
- name: Run tests
run: |
make test
- name: Run Author tests
run: |
make test TEST_AUTHOR=1 TEST_FILES="t/02critic.t t/03var.t t/04pod-syntax.t t/06pod-spelling.t t/07whitespaces.t t/09cpanmeta.t"
3 changes: 3 additions & 0 deletions t/07whitespaces.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ use UNIVERSAL::require;
plan(skip_all => 'Author test, set $ENV{TEST_AUTHOR} to a true value to run')
if !$ENV{TEST_AUTHOR};

plan(skip_all => 'Test::Whitespaces required')
unless Test::Whitespaces->require();

Test::Whitespaces->use({
dirs => [ qw/lib bin t/],
ignore => [ qr/~$/, qr/mock.t$/, qr/cisco.t$/ ],
Expand Down

0 comments on commit ec4cd86

Please sign in to comment.