Skip to content

refactor: move template handling from Provision command to OpenTofu w… #26

refactor: move template handling from Provision command to OpenTofu w…

refactor: move template handling from Provision command to OpenTofu w… #26

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: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y yamllint
npm install -g markdownlint-cli
- name: Run linting
run: ./script/lint
test:
runs-on: ubuntu-latest
name: Test
env:
PERL5LIB: ~/perl5/lib/perl5
PERL_LOCAL_LIB_ROOT: ~/perl5
PERL_MB_OPT: --install_base ~/perl5
PERL_MM_OPT: INSTALL_BASE=~/perl5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssh2-1-dev
- 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 environment (will be inherited by subsequent steps)
cpanm --local-lib=~/perl5 local::lib
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
# Export environment variables for subsequent steps
echo "PERL5LIB=$PERL5LIB" >> $GITHUB_ENV
echo "PERL_LOCAL_LIB_ROOT=$PERL_LOCAL_LIB_ROOT" >> $GITHUB_ENV
echo "PERL_MB_OPT=$PERL_MB_OPT" >> $GITHUB_ENV
echo "PERL_MM_OPT=$PERL_MM_OPT" >> $GITHUB_ENV
# Install Carmel
cpanm Carmel
- name: Install project dependencies
run: carmel install
- name: Run tests
run: |
# Note: E2E tests are excluded from CI as they require virtualization (KVM/QEMU)
# which is not available in GitHub Actions runners. To run E2E tests locally
# on your development machine with virtualization support, use:
# ./script/test e2e
# or
# ./script/test all
./script/test unit integration container