aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/default.yml
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2021-10-07 13:32:40 +0200
committerMarius Halden <marius.h@lden.org>2021-10-07 13:32:40 +0200
commit09dacfc6b8bf62addeee16c20b1d90c2a256da96 (patch)
tree7caa2bf9e92227ab74448f9b746dd28bbcb81b2a /.github/workflows/default.yml
parent585e57484f9c6332668bf1ac0a6a3b39dbe32223 (diff)
parentcea89fb87a96943708a1db0f646492fbfaaf000f (diff)
Merge tag 'v3.1' into fiksgatami-devfiksgatami-dev
Diffstat (limited to '.github/workflows/default.yml')
-rw-r--r--.github/workflows/default.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml
new file mode 100644
index 000000000..c3becce85
--- /dev/null
+++ b/.github/workflows/default.yml
@@ -0,0 +1,49 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ name: Test on perl ${{ matrix.perl_version }}
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ # stretch, buster, focal/bullseye, xenial, trusty
+ # bionic 5.26 is ubuntu-latest, in coverage run
+ perl_version: [ 5.24.4, 5.28.3, 5.30.3, 5.22.4, 5.18.4 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+
+ - name: Setup cache (carton)
+ uses: actions/cache@v2
+ with:
+ path: local
+ key: ${{ runner.os }}-perl-${{ matrix.perl_version }}-carton-${{ hashFiles('cpanfile.snapshot') }}
+
+ - name: Setup cache (perl)
+ id: cache-perl
+ uses: actions/cache@v2
+ with:
+ path: ~/perl5
+ key: ${{ runner.os }}-perl-${{ matrix.perl_version }}
+
+ - name: Install correct perl
+ if: steps.cache-perl.outputs.cache-hit != 'true'
+ run: |
+ wget -qO - https://install.perlbrew.pl | bash
+ ~/perl5/perlbrew/bin/perlbrew install --notest ${{ matrix.perl_version }}
+ ~/perl5/perlbrew/bin/perlbrew clean
+
+ - name: Add packages
+ run: |
+ sudo apt install -y gettext language-pack-en language-pack-de language-pack-sv libimage-magick-perl
+ ~/perl5/perlbrew/bin/perlbrew exec vendor/bin/carton install --deployment
+ commonlib/bin/gettext-makemo FixMyStreet
+
+ - name: Run tests
+ run: ~/perl5/perlbrew/bin/perlbrew exec script/test --jobs 3 t