Skip to content

ci: fix GitHub Actions workflow to use only trusted actions #3

ci: fix GitHub Actions workflow to use only trusted actions

ci: fix GitHub Actions workflow to use only trusted actions #3

Workflow file for this run

name: Testing
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo npm install -g markdownlint-cli
- name: Run linting
run: markdownlint "**/*.md"
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Perl and dependencies
run: |
# Ubuntu already has Perl 5.34+ installed
perl -v
# Install cpanminus to ~/perl5/bin
curl -L https://cpanmin.us | perl - App::cpanminus
# Add perl5/bin to PATH for this step and subsequent ones
export PATH="$HOME/perl5/bin:$PATH"
echo "$HOME/perl5/bin" >> $GITHUB_PATH
# Setup local::lib
cpanm --local-lib=~/perl5 local::lib
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
# Install Carmel
cpanm Carmel
- name: Install project dependencies
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
carmel install
- name: Run tests
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
carmel exec -- prove -l t/