diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7c0a388 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.github/workflows/issue-notify.yml b/.github/workflows/issue-notify.yml new file mode 100644 index 0000000..7d3373b --- /dev/null +++ b/.github/workflows/issue-notify.yml @@ -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 }} diff --git a/t/40-csv.t b/t/40-csv.t index f30cc22..7b0dac8 100644 --- a/t/40-csv.t +++ b/t/40-csv.t @@ -33,7 +33,7 @@ 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 ); @@ -41,7 +41,7 @@ subtest mtcars => sub { }; 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 diff --git a/t/41-example_data.t b/t/41-example_data.t index 8c89dca..6a6383c 100644 --- a/t/41-example_data.t +++ b/t/41-example_data.t @@ -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'); @@ -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' } );