|
| 1 | +# Each job should typically run in under 5 minutes. |
| 2 | +name: fast |
| 3 | + |
| 4 | +on: |
| 5 | + pull_request: {} |
| 6 | + |
| 7 | +env: |
| 8 | + CARGO_INCREMENTAL: 0 |
| 9 | + CARGO_NET_RETRY: 10 |
| 10 | + RUST_BACKTRACE: short |
| 11 | + RUSTUP_MAX_RETRIES: 10 |
| 12 | + |
| 13 | +permissions: |
| 14 | + contents: read |
| 15 | + |
| 16 | +jobs: |
| 17 | + |
| 18 | + # Linting |
| 19 | + check-clippy: |
| 20 | + timeout-minutes: 10 |
| 21 | + runs-on: ubuntu-latest |
| 22 | + container: |
| 23 | + image: docker://rust:1.56.0-buster |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 26 | + - run: rustup component add clippy |
| 27 | + - run: cargo clippy --all |
| 28 | + |
| 29 | + # Enforce automated formatting. |
| 30 | + check-fmt: |
| 31 | + timeout-minutes: 10 |
| 32 | + runs-on: ubuntu-latest |
| 33 | + container: |
| 34 | + image: docker://rust:1.56.0-buster |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 37 | + - run: rustup component add rustfmt |
| 38 | + - run: make check-fmt |
| 39 | + |
| 40 | + # Generate docs. |
| 41 | + check-docs: |
| 42 | + timeout-minutes: 10 |
| 43 | + runs-on: ubuntu-latest |
| 44 | + container: |
| 45 | + image: docker://rust:1.56.0-buster |
| 46 | + steps: |
| 47 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 48 | + - run: | |
| 49 | + cargo doc --all --no-deps \ |
| 50 | + --exclude=linkerd-meshtls \ |
| 51 | + --exclude=linkerd-meshtls-rustls |
| 52 | +
|
| 53 | + # Test the meshtls backends. |
| 54 | + test-meshtls: |
| 55 | + timeout-minutes: 10 |
| 56 | + runs-on: ubuntu-latest |
| 57 | + container: |
| 58 | + image: docker://rust:1.56.0-buster |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 61 | + - working-directory: ./linkerd/meshtls |
| 62 | + run: cargo test --all-features --no-run |
| 63 | + - working-directory: ./linkerd/meshtls |
| 64 | + run: cargo test --all-features |
| 65 | + - working-directory: ./linkerd/meshtls |
| 66 | + run: | |
| 67 | + cargo test --no-run \ |
| 68 | + --package=linkerd-meshtls-rustls |
| 69 | + - working-directory: ./linkerd/meshtls |
| 70 | + run: | |
| 71 | + cargo test \ |
| 72 | + --package=linkerd-meshtls-rustls |
| 73 | + - working-directory: linkerd/meshtls |
| 74 | + run: | |
| 75 | + cargo doc --all-features --no-deps \ |
| 76 | + --package=linkerd-meshtls \ |
| 77 | + --package=linkerd-meshtls-rustls |
| 78 | +
|
| 79 | + # Run non-integration tests. This should be quick. |
| 80 | + test-unit: |
| 81 | + timeout-minutes: 10 |
| 82 | + runs-on: ubuntu-latest |
| 83 | + container: |
| 84 | + image: docker://rust:1.56.0-buster |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 87 | + - run: | |
| 88 | + cargo test --all --no-run \ |
| 89 | + --exclude=linkerd-app \ |
| 90 | + --exclude=linkerd-app-admin \ |
| 91 | + --exclude=linkerd-app-core \ |
| 92 | + --exclude=linkerd-app-gateway \ |
| 93 | + --exclude=linkerd-app-inbound \ |
| 94 | + --exclude=linkerd-app-integration \ |
| 95 | + --exclude=linkerd-app-outbound \ |
| 96 | + --exclude=linkerd-app-test \ |
| 97 | + --exclude=linkerd-meshtls \ |
| 98 | + --exclude=linkerd-meshtls-rustls \ |
| 99 | + --exclude=linkerd2-proxy |
| 100 | + - run: | |
| 101 | + cargo test --all \ |
| 102 | + --exclude=linkerd-app \ |
| 103 | + --exclude=linkerd-app-admin \ |
| 104 | + --exclude=linkerd-app-core \ |
| 105 | + --exclude=linkerd-app-gateway \ |
| 106 | + --exclude=linkerd-app-inbound \ |
| 107 | + --exclude=linkerd-app-integration \ |
| 108 | + --exclude=linkerd-app-outbound \ |
| 109 | + --exclude=linkerd-app-test \ |
| 110 | + --exclude=linkerd-meshtls \ |
| 111 | + --exclude=linkerd-meshtls-rustls \ |
| 112 | + --exclude=linkerd2-proxy |
| 113 | +
|
| 114 | + # Check for security advisories. |
| 115 | + # |
| 116 | + # TODO(ver): This should open issues against the linkerd2 repo (and be run in a cron). |
| 117 | + deps-advisories: |
| 118 | + timeout-minutes: 10 |
| 119 | + runs-on: ubuntu-latest |
| 120 | + # Prevent sudden announcement of a new advisory from failing Ci. |
| 121 | + continue-on-error: true |
| 122 | + steps: |
| 123 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 124 | + - uses: EmbarkStudios/cargo-deny-action@0ca727bbae7b7b578b9a5f98186caac35aa2a00d |
| 125 | + with: |
| 126 | + command: check advisories |
| 127 | + |
| 128 | + # Audit licenses, unreleased crates, and unexpected duplicate versions. |
| 129 | + deps-bans: |
| 130 | + timeout-minutes: 10 |
| 131 | + runs-on: ubuntu-latest |
| 132 | + steps: |
| 133 | + - uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579 |
| 134 | + - uses: EmbarkStudios/cargo-deny-action@0ca727bbae7b7b578b9a5f98186caac35aa2a00d |
| 135 | + with: |
| 136 | + command: check bans licenses sources |
0 commit comments