This repository was archived by the owner on Oct 10, 2025. It is now read-only.
refactor: unify test execution scripts with single test command #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 apt-get install -y yamllint | |
sudo npm install -g markdownlint-cli | |
- name: Run markdown linting | |
run: markdownlint "**/*.md" | |
- name: Run yaml linting | |
run: yamllint -c .yamllint-ci.yml . | |
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 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 |