|
| 1 | +name: "Copilot Setup Steps" |
| 2 | + |
| 3 | +# Automatically run the setup steps when they are changed to allow for easy validation, |
| 4 | +# and allow manual testing through the repository's "Actions" tab |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + push: |
| 8 | + paths: |
| 9 | + - .github/workflows/copilot-setup-steps.yml |
| 10 | + pull_request: |
| 11 | + paths: |
| 12 | + - .github/workflows/copilot-setup-steps.yml |
| 13 | + |
| 14 | +jobs: |
| 15 | + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. |
| 16 | + copilot-setup-steps: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + |
| 19 | + # Set the permissions to the lowest permissions possible needed for your steps. |
| 20 | + # Copilot will be given its own token for its operations. |
| 21 | + permissions: |
| 22 | + # We need to clone the repository to build and run the dependency-installer binary |
| 23 | + contents: read |
| 24 | + |
| 25 | + steps: |
| 26 | + - name: Checkout code |
| 27 | + uses: actions/checkout@v4 |
| 28 | + |
| 29 | + - name: Set up Rust toolchain |
| 30 | + uses: dtolnay/rust-toolchain@stable |
| 31 | + with: |
| 32 | + toolchain: stable |
| 33 | + |
| 34 | + - name: Enable Rust cache |
| 35 | + uses: Swatinem/rust-cache@v2 |
| 36 | + |
| 37 | + - name: Build dependency-installer binary |
| 38 | + run: | |
| 39 | + cd packages/dependency-installer |
| 40 | + cargo build --release --bin dependency-installer |
| 41 | +
|
| 42 | + - name: Install all development dependencies |
| 43 | + run: | |
| 44 | + # Use the binary we just built to install all dependencies |
| 45 | + sudo packages/dependency-installer/target/release/dependency-installer install |
| 46 | + env: |
| 47 | + # Ensure non-interactive installation |
| 48 | + DEBIAN_FRONTEND: noninteractive |
| 49 | + |
| 50 | + - name: Verify installations |
| 51 | + run: | |
| 52 | + # Verify all tools are installed correctly |
| 53 | + packages/dependency-installer/target/release/dependency-installer check |
0 commit comments