Trying to fix the permissions problems in setting up dirs. #8
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: Path Helper Tests | |
on: | |
push: | |
branches: | |
- master | |
- v4 | |
pull_request: | |
branches: | |
- master | |
- v4 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: ['2.3.7', '2.7.0', '3.3.5'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup latest Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
- name: Set up test environment | |
run: | | |
sudo mv ./docker/assets/etc-paths /etc/paths | |
# Ensure executables are... executable | |
chmod +x exe/path_helper | |
chmod +x spec/shell_spec.sh | |
./exe/path_helper --setup --no-lib --no-etc --config --quiet | |
sudo ./exe/path_helper --setup --no-lib --etc --no-config --quiet | |
cp -R spec/fixtures/moredirs/* $HOME/.config/paths/ | |
- name: Run tests | |
env: | |
PATH_HELPER_DOCKER_INSTANCE: "true" | |
run: | | |
set -o pipefail | |
sudo spec/shell_spec.sh | tee test_output_ruby-${{ matrix.ruby-version }}.log | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: test-results-ruby-${{ matrix.ruby-version }} | |
path: test_output_ruby-${{ matrix.ruby-version }}.log | |