From f367353b6a9dda61145ed1e68a36bc1dde3c5208 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 18 Jan 2020 10:32:00 +0900 Subject: [PATCH 1/5] Add a workflow yaml --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e0fbbae --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: build + +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + +jobs: + perl: + runs-on: ubuntu-latest + + strategy: + matrix: + perl-version: + - '5.8' + - '5.10' + - '5.18' + - 'latest' + + container: + image: perl:${{ matrix.perl-version }} + + steps: + - uses: actions/checkout@v1 + - name: perl -V + run: perl -V + - name: Install dependencies + run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --show-build-log-on-failure + if: matrix.perl-version != 'latest' + - name: Install dependencies with develop + run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure + if: matrix.perl-version == 'latest' + - name: Install Cover + run: curl -sL https://git.io/cpm | perl - install -g --show-build-log-on-failure Devel::Cover::Report::Coveralls + if: matrix.perl-version == 'latest' + - name: Run tests + run: perl Makefile.PL && make && make test + - name: Run Cover + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + cover -test + cover -report coveralls + if: matrix.perl-version == 'latest' From 893dcfeb8074ed189a9263f362a228f7fef2464c Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 18 Jan 2020 10:36:06 +0900 Subject: [PATCH 2/5] Add cpanfile --- cpanfile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 cpanfile diff --git a/cpanfile b/cpanfile new file mode 100644 index 0000000..000d99d --- /dev/null +++ b/cpanfile @@ -0,0 +1,5 @@ +requires 'DBI', '1.57'; + +on test => sub { + requires 'Test::More', '0.88'; +}; From 35902ff85a37c9fae3f66e325d8362b189c8591d Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 18 Jan 2020 10:42:23 +0900 Subject: [PATCH 3/5] Simply build.yml --- .github/workflows/build.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0fbbae..577ab84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,19 +29,5 @@ jobs: run: perl -V - name: Install dependencies run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --show-build-log-on-failure - if: matrix.perl-version != 'latest' - - name: Install dependencies with develop - run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure - if: matrix.perl-version == 'latest' - - name: Install Cover - run: curl -sL https://git.io/cpm | perl - install -g --show-build-log-on-failure Devel::Cover::Report::Coveralls - if: matrix.perl-version == 'latest' - name: Run tests run: perl Makefile.PL && make && make test - - name: Run Cover - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - run: | - cover -test - cover -report coveralls - if: matrix.perl-version == 'latest' From 07367324c5c6df3af6a10bf0ff375500de3c6b77 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 18 Jan 2020 10:46:34 +0900 Subject: [PATCH 4/5] Add yaml files for windows and mac --- .github/workflows/build_mac.yml | 24 ++++++++++++++++++++++++ .github/workflows/build_windows.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/build_mac.yml create mode 100644 .github/workflows/build_windows.yml diff --git a/.github/workflows/build_mac.yml b/.github/workflows/build_mac.yml new file mode 100644 index 0000000..2d9e7f0 --- /dev/null +++ b/.github/workflows/build_mac.yml @@ -0,0 +1,24 @@ +name: build_mac + +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + +jobs: + perl: + runs-on: macOS-latest + + steps: + - uses: actions/checkout@master + - name: perl -V + run: perl -V + - name: Install dependencies with develop + run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure + - name: Run Makefile.PL + run: perl Makefile.PL + - name: Run tests + run: make && make test diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 0000000..7f4dd06 --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,28 @@ +name: build_windows + +on: + push: + branches: + - '*' + tags-ignore: + - '*' + pull_request: + +jobs: + perl: + runs-on: windows-latest + + steps: + - uses: actions/checkout@master + - name: Set up Perl + run: | + choco install strawberryperl + echo "##[add-path]C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" + - name: perl -V + run: perl -V + - name: Install dependencies with develop + run: curl -sL https://git.io/cpm | perl - install -g --with-recommends --with-test --with-configure --with-develop --show-build-log-on-failure + - name: Run Makefile.PL + run: perl Makefile.PL + - name: Run tests + run: gmake test From ccf4afe0f486f19b97006b609e249b739230a4f9 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Sat, 18 Jan 2020 10:53:18 +0900 Subject: [PATCH 5/5] Test only 5.8 and the latest --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 577ab84..b552e66 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,6 @@ jobs: matrix: perl-version: - '5.8' - - '5.10' - - '5.18' - 'latest' container: