Improve pty test (debug ci) #2290
Workflow file for this run
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: | |
- main | |
pull_request: | |
branches: | |
- main | |
merge_group: | |
branches: | |
- main | |
jobs: | |
compliance-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
SUDO_TEST_PROFRAW_DIR: /tmp/profraw | |
SUDO_TEST_VERBOSE_DOCKER_BUILD: 1 | |
CI: true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: set up docker buildx | |
run: docker buildx create --name builder --use | |
- name: cache docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: docker-buildx-rs-${{ github.sha }} | |
restore-keys: docker-buildx-rs- | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "compliance-tests" | |
workspaces: | | |
test-framework | |
- name: Run gated compliance tests against sudo-rs | |
working-directory: test-framework | |
env: | |
SUDO_UNDER_TEST: ours | |
run: cargo test -p sudo-compliance-tests insufficient_permissions_to_execute -- --nocapture | |
- name: prevent the cache from growing too large | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache |