Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions CI #32

Merged
merged 4 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: perl
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
create:

env:
IRC_REPO_OWNER: 'EntropyOrg'

jobs:
notify:
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ always() }}
steps:
- uses: PDLPorters/devops/github-actions/irc-notifications@master
with:
target-notifications: true
repository_owner: ${{ env.IRC_REPO_OWNER }}
dist:
name: Make distribution using Dist::Zilla
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: 'build-dzil-dist'
uses: PDLPorters/devops/github-actions/build-dzil-dist@master
ci:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
needs: [ notify, dist ]
strategy:
fail-fast: false
matrix:
os: [macos-11, windows-latest, ubuntu-latest]
perl-version: ['5']
include:
- { os: 'ubuntu-latest', perl-version: "5.16" }
- { os: 'ubuntu-latest', perl-version: "5.20" }
- { os: 'ubuntu-latest', perl-version: "5.30" }
- { os: 'ubuntu-latest', perl-version: "5.32" }
#- perl-version: '5.32'
# os: ubuntu-latest
# release-test: true
# coverage: true
steps:
- uses: actions/checkout@v2
- name: Get dist artifact
uses: actions/download-artifact@v2
with:
name: dist
path: build-dir
- name: 'ci-dist: target-setup-perl'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
path: build-dir
target-setup-perl: true
perl-version: ${{ matrix.perl-version }}
build-enable-parallel: false # Sereal::Encoder can not build in parallel
- name: 'ci-dist: target-all after install-dist-perl-deps'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
path: build-dir
target-setup-perl: false
target-install-dist-perl-deps: true
target-test-release-testing: true
target-test: true
build-enable-parallel: false
test-enable-release-testing: ${{ matrix.release-test }}
test-enable-coverage: ${{ matrix.coverage }}
github-token: ${{ secrets.GITHUB_TOKEN }}

build-status:
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ always() }}
needs: [ 'ci' ]
steps:
- uses: PDLPorters/devops/github-actions/irc-notifications@master
with:
target-build-status: true
needs: ${{ toJSON(needs) }}
repository_owner: ${{ env.IRC_REPO_OWNER }}
21 changes: 21 additions & 0 deletions .github/workflows/issue-notify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: issue-notify

on:
issues:
types: [opened]
issue_comment:
types: [created]

env:
IRC_REPO_OWNER: 'EntropyOrg'

jobs:
notify:
runs-on: ubuntu-latest
continue-on-error: true
if: ${{ always() }}
steps:
- uses: PDLPorters/devops/github-actions/irc-notifications@master
with:
target-notifications: true
repository_owner: ${{ env.IRC_REPO_OWNER }}
4 changes: 2 additions & 2 deletions t/40-csv.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ subtest mtcars => sub {
'column_names() is same as column_names()' );
diag( $df->string );

my $tempfile = Path::Tiny->tempfile;
my $tempfile = Path::Tiny->tempfile( SUFFIX => '.csv' );
$df->to_csv($tempfile);

my $df_recovered = Data::Frame->from_csv( $tempfile, row_names => 0 );
dataframe_is( $df_recovered, $df, '$df->to_csv' );
};

subtest na => sub {
my $tempfile = Path::Tiny->tempfile;
my $tempfile = Path::Tiny->tempfile( SUFFIX => '.csv' );
$tempfile->spew(<<'EOT');
c1,c2,c3
A,1,2019-01-01
Expand Down
4 changes: 2 additions & 2 deletions t/41-example_data.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ subtest airquality => sub {
my $airquality = airquality();
is($airquality->at('Ozone')->nbad, 37, 'airquality');

my $tempfile = Path::Tiny->tempfile;
my $tempfile = Path::Tiny->tempfile( SUFFIX => '.csv' );
$airquality->to_csv($tempfile, row_names => false, na => 'MYNA');
my $df = Data::Frame->from_csv($tempfile, na => 'MYNA');
dataframe_is($df, $airquality, '$df->to_csv() handles NA');
Expand Down Expand Up @@ -88,7 +88,7 @@ END_OF_TEXT

is($economics->string, $expected, 'stringification of datetime column');

my $tempfile = Path::Tiny->tempfile;
my $tempfile = Path::Tiny->tempfile( SUFFIX => '.csv' );
$economics->to_csv($tempfile, row_names => false);
my $df =
Data::Frame->from_csv( $tempfile, dtype => { date => 'datetime' } );
Expand Down