fix: remote CI testing #48
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| # where the job will run on | |
| # runs-on: ${{ matrix.os }} | |
| # strategy: | |
| # matrix: | |
| # os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ubuntu-latest | |
| steps: | |
| # `git config [OPTIONS] + git clone [OPTIONS]` in a nutshell | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Pull Bats Docker image | |
| run: docker pull bats/bats:latest | |
| - name: Test clone_bash_template.sh | |
| shell: bash | |
| env: | |
| TERM: xterm | |
| run: | | |
| docker run \ | |
| --rm \ | |
| --user="$(id -u):$(id -g)" \ | |
| --network none \ | |
| --security-opt=no-new-privileges:true \ | |
| --volume="$PWD:/code:ro" \ | |
| bats/bats:latest \ | |
| /code/tests |