docs: update the usage document of l.parse_args #115
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- 'test/**' | |
- develop | |
tags: | |
- v* | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
inputs: {} | |
jobs: | |
alpine: | |
runs-on: ubuntu-22.04 | |
if: "!( | |
startsWith(github.event.head_commit.message, 'docs:') || | |
startsWith(github.event.head_commit.message, 'ci:') || | |
startsWith(github.event.head_commit.message, 'chore:') || | |
startsWith(github.event.head_commit.message, 'style:') | |
)" | |
strategy: | |
fail-fast: true | |
max-parallel: 10 | |
matrix: | |
# 5.2 and 5.2.9 are same in bash docker image | |
BASHVER: ['4.0', '4.1', '4.2', '4.3', '4.4', '5.0', '5.1', '5.2'] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: BASHVER=${{ matrix.BASHVER }} BUILD_DIST=true PULL_IMAGE=true ./tools/test-in-docker | |
host: | |
if: "!( | |
startsWith(github.event.head_commit.message, 'docs:') || | |
startsWith(github.event.head_commit.message, 'ci:') || | |
startsWith(github.event.head_commit.message, 'chore:') || | |
startsWith(github.event.head_commit.message, 'style:') | |
)" | |
strategy: | |
fail-fast: true | |
max-parallel: 10 | |
matrix: | |
os: ['ubuntu-22.04', 'macos-13'] | |
# Bash 4.0 has bug on MacOS. https://github.com/adoyle-h/lobash/blob/develop/docs/with-lower-version-bash.md#not-test-with-bash-40 | |
BASHVER: ['4.1', '4.2', '4.3', '4.4', '5.0', '5.1', '5.2', '5.2.9'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Init | |
run: | | |
echo "PWD: $PWD" | |
echo "ACT: ${{ env.ACT }}" | |
- name: Cache test/fixture | |
if: ${{ !env.ACT }} | |
id: cache-test-fixture | |
uses: actions/cache@v4 | |
with: | |
path: | | |
tests/fixture/assert | |
tests/fixture/bats | |
tests/fixture/bats-file | |
tests/fixture/support | |
key: ${{ runner.os }}-test-fixture | |
- name: Cache bash | |
if: ${{ !env.ACT }} | |
id: cache-bash | |
uses: actions/cache@v4 | |
with: | |
path: ./tmp/bash-${{ matrix.BASHVER }} | |
key: ${{ runner.os }}-bash-${{ matrix.BASHVER }} | |
- name: Update git submodules | |
if: steps.cache-test-fixture.outputs.cache-hit != 'true' | |
run: | |
git submodule update --init --recursive | |
- name: Install bash | |
if: steps.cache-bash.outputs.cache-hit != 'true' | |
run: | | |
BASHVER=${{ matrix.BASHVER }} ./tools/install-bash | |
- name: To build ./dist/lobash.bash | |
run: | | |
export PATH="${{ github.workspace }}/tmp/bash-${{ matrix.BASHVER }}/bin:$PATH" | |
bash --version | |
./build -m "${{ matrix.BASHVER }}" ./dist/ | |
- name: Start to test | |
run: | | |
export PATH="${{ github.workspace }}/tmp/bash-${{ matrix.BASHVER }}/bin:$PATH" | |
OS=${{ matrix.os }} CI=true ./test -d |