disable unprivileged user namespaces to let bwrap set up uid map #30
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: Run test suite | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: {} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: w3c/linkchecker-testsuite | |
| path: test-suite | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install test suite dependencies | |
| working-directory: test-suite/harness | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: link-checker | |
| # using https://github.com/shogo82148/actions-setup-perl created | |
| # issue with installing libcss-dom-perl due to | |
| # old syntax in package | |
| # see https://rt.cpan.org/Public/Bug/Display.html?id=146661 | |
| - name: Install perl | |
| run: sudo apt-get install -y perl cpanminus libcss-dom-perl libwww-perl | |
| - name: Install checker dependencies | |
| working-directory: link-checker | |
| run: cpanm --installdeps . | |
| - name: run test server | |
| working-directory: test-suite | |
| run: python server.py & | |
| - name: install bubblewrap | |
| run: sudo apt-get install -y bubblewrap | |
| - name: disable unprivileged user namespaces restriction | |
| run: | | |
| sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0 | |
| sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 | |
| - name: run test suite | |
| working-directory: test-suite/harness | |
| run: bwrap --dev-bind / / --ro-bind ../hosts /etc/hosts sh -c "python linktest.py --checker_path ../../link-checker/bin/checklink run" |