|
| 1 | +# This file is automatically added by @npmcli/template-oss. Do not edit. |
| 2 | + |
| 3 | +name: CI - @npmcli/config |
| 4 | + |
| 5 | +on: |
| 6 | + workflow_dispatch: |
| 7 | + pull_request: |
| 8 | + paths: |
| 9 | + - workspaces/config/** |
| 10 | + push: |
| 11 | + branches: |
| 12 | + - main |
| 13 | + - latest |
| 14 | + paths: |
| 15 | + - workspaces/config/** |
| 16 | + schedule: |
| 17 | + # "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1 |
| 18 | + - cron: "0 9 * * 1" |
| 19 | + |
| 20 | +jobs: |
| 21 | + engines: |
| 22 | + name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }} |
| 23 | + if: github.repository_owner == 'npm' |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + platform: |
| 28 | + - name: Linux |
| 29 | + os: ubuntu-latest |
| 30 | + shell: bash |
| 31 | + node-version: |
| 32 | + - 14.17.0 |
| 33 | + - 16.13.0 |
| 34 | + - 18.0.0 |
| 35 | + runs-on: ${{ matrix.platform.os }} |
| 36 | + defaults: |
| 37 | + run: |
| 38 | + shell: ${{ matrix.platform.shell }} |
| 39 | + steps: |
| 40 | + - name: Checkout |
| 41 | + uses: actions/checkout@v3 |
| 42 | + - name: Setup Git User |
| 43 | + run: | |
| 44 | + git config --global user.email "npm-cli+bot@github.com" |
| 45 | + git config --global user.name "npm CLI robot" |
| 46 | + - name: Setup Node |
| 47 | + uses: actions/setup-node@v3 |
| 48 | + with: |
| 49 | + node-version: ${{ matrix.node-version }} |
| 50 | + cache: npm |
| 51 | + - name: Reset Deps |
| 52 | + run: node . run resetdeps -- --engines-strict |
| 53 | + |
| 54 | + lint: |
| 55 | + name: Lint |
| 56 | + if: github.repository_owner == 'npm' |
| 57 | + runs-on: ubuntu-latest |
| 58 | + defaults: |
| 59 | + run: |
| 60 | + shell: bash |
| 61 | + steps: |
| 62 | + - name: Checkout |
| 63 | + uses: actions/checkout@v3 |
| 64 | + - name: Setup Git User |
| 65 | + run: | |
| 66 | + git config --global user.email "npm-cli+bot@github.com" |
| 67 | + git config --global user.name "npm CLI robot" |
| 68 | + - name: Setup Node |
| 69 | + uses: actions/setup-node@v3 |
| 70 | + with: |
| 71 | + node-version: 18.x |
| 72 | + cache: npm |
| 73 | + - name: Reset Deps |
| 74 | + run: node . run resetdeps |
| 75 | + - name: Lint |
| 76 | + run: node . run lint --ignore-scripts -w @npmcli/config |
| 77 | + - name: Post Lint |
| 78 | + run: node . run postlint --ignore-scripts -w @npmcli/config |
| 79 | + |
| 80 | + test: |
| 81 | + name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }} |
| 82 | + if: github.repository_owner == 'npm' |
| 83 | + strategy: |
| 84 | + fail-fast: false |
| 85 | + matrix: |
| 86 | + platform: |
| 87 | + - name: Linux |
| 88 | + os: ubuntu-latest |
| 89 | + shell: bash |
| 90 | + - name: macOS |
| 91 | + os: macos-latest |
| 92 | + shell: bash |
| 93 | + - name: Windows |
| 94 | + os: windows-latest |
| 95 | + shell: cmd |
| 96 | + node-version: |
| 97 | + - 14.17.0 |
| 98 | + - 14.x |
| 99 | + - 16.13.0 |
| 100 | + - 16.x |
| 101 | + - 18.0.0 |
| 102 | + - 18.x |
| 103 | + runs-on: ${{ matrix.platform.os }} |
| 104 | + defaults: |
| 105 | + run: |
| 106 | + shell: ${{ matrix.platform.shell }} |
| 107 | + steps: |
| 108 | + - name: Checkout |
| 109 | + uses: actions/checkout@v3 |
| 110 | + - name: Setup Git User |
| 111 | + run: | |
| 112 | + git config --global user.email "npm-cli+bot@github.com" |
| 113 | + git config --global user.name "npm CLI robot" |
| 114 | + - name: Setup Node |
| 115 | + uses: actions/setup-node@v3 |
| 116 | + with: |
| 117 | + node-version: ${{ matrix.node-version }} |
| 118 | + cache: npm |
| 119 | + - name: Reset Deps |
| 120 | + run: node . run resetdeps |
| 121 | + - name: Link |
| 122 | + if: matrix |
| 123 | + run: node . link -f --ignore-scripts |
| 124 | + - name: Rebuild cmark-gfm |
| 125 | + run: node . rebuild cmark-gfm |
| 126 | + - name: Add Problem Matcher |
| 127 | + run: echo "::add-matcher::.github/matchers/tap.json" |
| 128 | + - name: Test |
| 129 | + run: node . test --ignore-scripts -w @npmcli/config |
| 130 | + - name: Check Git Status |
| 131 | + if: matrix && matrix.platform.os != 'windows-latest' |
| 132 | + run: node scripts/git-dirty.js |
0 commit comments