Skip to content

Commit

Permalink
Add .github dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkoi committed Nov 18, 2024
1 parent 95ef9b6 commit 4b5fdd7
Show file tree
Hide file tree
Showing 4 changed files with 175 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: linux

on:
push:
branches:
- '*'
# tags-ignore:
# - '*'
workflow_dispatch:
# pull_request:

jobs:
perl:
env:
# some plugins still needs this to run their tests...
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
perl-version:
- 'latest'
- '5.034'
- '5.028'
- '5.020'
# - '5.18' No dzil
# - '5.16' No dzil
# - '5.10' No dzil

container:
image: perldocker/perl-tester:${{ matrix.perl-version }}

steps:
- name: Checkout
uses: actions/checkout@v4
- name: perl -V
run: perl -V
# - name: Install Dependencies
# #run: cpm install -g --no-test --show-build-log-on-failure --cpanfile cpanfile
# run: cpm install -g --no-test --show-build-log-on-failure --cpanfile cpanfile
# - name: Makefile.PL
# run: perl Makefile.PL
- name: Install Dist::Zilla Author Dependencies
run: dzil authordeps --missing --versions | cpanm --verbose --force --notest || true
- name: Install Dependencies
run: dzil listdeps --missing --develop --requires --recommends --suggests --version | cpanm --verbose --force --notest || true
- name: Run Tests
run: prove -lrv t
15 changes: 15 additions & 0 deletions .github/workflows/perltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
# push:
# branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
build:
uses: mikkoi/github_workflows/.github/workflows/cpan-test.yml@main

coverage:
uses: mikkoi/github_workflows/.github/workflows/cpan-coverage.yml@main
106 changes: 106 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: windows

on:
push:
branches:
- '*'
tags-ignore:
- '*'
workflow_dispatch:
# pull_request:

jobs:
perl:
# name: Perl Perl ${{ matrix.perl }} on ${{ matrix.os }}
# https://justatheory.com/2021/11/cache-perl-github-workflows/
env:
# some plugins still needs this to run their tests...
PERL_USE_UNSAFE_INC: 0
AUTHOR_TESTING: 1
AUTOMATED_TESTING: 1
RELEASE_TESTING: 1

# strategy:
# matrix:
# os: [ windows ]
# perl: [ 'latest' ]
runs-on: windows-latest
# runs-on: ${{ matrix.os }}-latest

steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4

# There is no strategy/matrix because Windows container has its own
# Strawberry Perl and we go with whatever version it is.

# - id: cache-cpan
# name: Cache CPAN modules
# uses: actions/cache@v4
# # env:
# # cache-name: cache-cpan-modules
# with:
# # npm cache files are stored in `~/.npm` on Linux/macOS
# # path: ~/.cpan
# # path: local
# path: C:/Strawberry/perl/site/lib
# # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# # key: perl-${{ steps.perl.outputs.perl-hash }}
# key: static
# # restore-keys: |
# # ${{ runner.os }}-build-${{ env.cache-name }}-
# # ${{ runner.os }}-build-
# # ${{ runner.os }}-
- id: explore-tools-perl
name: Explore Tools Perl
run: |
perl -V
- id: explore-tools-cpan
name: Explore Tools Cpan
run: |
cpan -V
- id: explore-filesystem
name: Explore Filesystem
run: |
dir
dir C:\
dir C:\Users
dir C:/Strawberry/perl/site/lib
dir ..
dir ..\..
dir D:\
# dir .cpan
# dir .cpan\build
- id: explore-whoami
name: Explore Who Am I
run: |
whoami
- id: explore-environment
name: Explore Environment
run: |
Get-ChildItem env: | Format-Table -Wrap
- id: install-dzil
name: Install Dist::Zilla
# -T Do not test modules. Simply install them.
run: |
cpan -T Dist::Zilla
# # - id:
# name: Install Dependencies
# # #run: cpm install -g --no-test --show-build-log-on-failure --cpanfile cpanfile
# # run: cpm install -g --no-test --show-build-log-on-failure --cpanfile cpanfile
# # - id:
# name: Makefile.PL
# # run: perl Makefile.PL
- id: install-dzil-authordeps
name: Install Dist::Zilla Author Dependencies
run: |
dzil authordeps --missing --versions | cpanm --verbose --force --notest || true
- id: install-deps
name: Install Dependencies
run: |
dzil listdeps --missing --develop --requires --recommends --suggests --version | cpanm --verbose --force --notest || true
- id: run-tests
name: Run Tests
run: |
prove -lrv t
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for {{$dist->name}}

{{$NEXT}}
* Add .github dir.
* Add files CONTRIBUTING.md, CODE_OF_CONDUCT.md and SECURITY.md.
* Clean dist.ini.
* Remove fatpacker instruction from README.
Expand Down

0 comments on commit 4b5fdd7

Please sign in to comment.