| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ extends: | |||
| 5 | 5 | - eslint:recommended | |
| 6 | 6 | - plugin:@typescript-eslint/eslint-recommended | |
| 7 | 7 | - plugin:@typescript-eslint/recommended | |
| 8 | - - prettier/@typescript-eslint | ||
| 8 | + - prettier | ||
| 9 | 9 | parserOptions: | |
| 10 | 10 | project: ['tsconfig.eslint.json'] | |
| 11 | 11 | rules: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,12 @@ | |||
| 1 | + name: 'Install dependencies' | ||
| 2 | + description: 'Set up node and install dependencies' | ||
| 3 | + runs: | ||
| 4 | + using: 'composite' | ||
| 5 | + steps: | ||
| 6 | + - uses: actions/setup-node@v3 | ||
| 7 | + with: | ||
| 8 | + node-version: '20.x' | ||
| 9 | + cache: npm | ||
| 10 | + | ||
| 11 | + - run: npm ci | ||
| 12 | + shell: bash | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,14 +20,7 @@ jobs: | |||
| 20 | 20 | steps: | |
| 21 | 21 | - uses: actions/checkout@v3 | |
| 22 | 22 | ||
| 23 | - - name: Set Node.js 16.x | ||
| 24 | - uses: actions/setup-node@v3 | ||
| 25 | - with: | ||
| 26 | - node-version: 16.x | ||
| 27 | - cache: npm | ||
| 28 | - | ||
| 29 | - - name: Install dependencies | ||
| 30 | - run: npm ci | ||
| 23 | + - uses: ./.github/actions/install-dependencies | ||
| 31 | 24 | ||
| 32 | 25 | - name: Rebuild the dist/ directory | |
| 33 | 26 | run: npm run build | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,10 +11,6 @@ jobs: | |||
| 11 | 11 | runs-on: ubuntu-latest | |
| 12 | 12 | steps: | |
| 13 | 13 | - uses: actions/checkout@v3 | |
| 14 | - - uses: actions/setup-node@v3 | ||
| 15 | - with: | ||
| 16 | - node-version: 16 | ||
| 17 | - cache: npm | ||
| 18 | - - run: npm ci | ||
| 14 | + - uses: ./.github/actions/install-dependencies | ||
| 19 | 15 | - run: npm run style:check | |
| 20 | 16 | - run: npm test | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,12 +50,7 @@ jobs: | |||
| 50 | 50 | runs-on: ubuntu-latest | |
| 51 | 51 | steps: | |
| 52 | 52 | - uses: actions/checkout@v3 | |
| 53 | - - uses: actions/cache@v3 | ||
| 54 | - with: | ||
| 55 | - path: ~/.npm | ||
| 56 | - key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} | ||
| 57 | - restore-keys: ${{runner.os}}-npm- | ||
| 58 | - - run: npm ci | ||
| 53 | + - uses: ./.github/actions/install-dependencies | ||
| 59 | 54 | - id: npm-require | |
| 60 | 55 | uses: ./ | |
| 61 | 56 | with: | |
@@ -71,23 +66,18 @@ jobs: | |||
| 71 | 66 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY | |
| 72 | 67 | ||
| 73 | 68 | test-previews: | |
| 74 | - name: 'Integration test: previews option' | ||
| 69 | + name: 'Integration test: GraphQL previews option' | ||
| 75 | 70 | runs-on: ubuntu-latest | |
| 76 | 71 | steps: | |
| 77 | 72 | - uses: actions/checkout@v3 | |
| 78 | - - uses: actions/cache@v3 | ||
| 79 | - with: | ||
| 80 | - path: ~/.npm | ||
| 81 | - key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} | ||
| 82 | - restore-keys: ${{runner.os}}-npm- | ||
| 83 | - - run: npm ci | ||
| 73 | + - uses: ./.github/actions/install-dependencies | ||
| 84 | 74 | - id: previews-default | |
| 85 | 75 | name: Default previews not set | |
| 86 | 76 | uses: ./ | |
| 87 | 77 | with: | |
| 88 | 78 | script: | | |
| 89 | 79 | const endpoint = github.request.endpoint | |
| 90 | - return endpoint({}).headers.accept | ||
| 80 | + return endpoint({url: "/graphql"}).headers.accept | ||
| 91 | 81 | result-encoding: string | |
| 92 | 82 | - id: previews-set-single | |
| 93 | 83 | name: Previews set to a single value | |
@@ -96,7 +86,7 @@ jobs: | |||
| 96 | 86 | previews: foo | |
| 97 | 87 | script: | | |
| 98 | 88 | const endpoint = github.request.endpoint | |
| 99 | - return endpoint({}).headers.accept | ||
| 89 | + return endpoint({url: "/graphql"}).headers.accept | ||
| 100 | 90 | result-encoding: string | |
| 101 | 91 | - id: previews-set-multiple | |
| 102 | 92 | name: Previews set to comma-separated list | |
@@ -105,7 +95,7 @@ jobs: | |||
| 105 | 95 | previews: foo,bar,baz | |
| 106 | 96 | script: | | |
| 107 | 97 | const endpoint = github.request.endpoint | |
| 108 | - return endpoint({}).headers.accept | ||
| 98 | + return endpoint({url: "/graphql"}).headers.accept | ||
| 109 | 99 | result-encoding: string | |
| 110 | 100 | - run: | | |
| 111 | 101 | echo "- Validating previews default" | |
@@ -133,12 +123,7 @@ jobs: | |||
| 133 | 123 | runs-on: ubuntu-latest | |
| 134 | 124 | steps: | |
| 135 | 125 | - uses: actions/checkout@v3 | |
| 136 | - - uses: actions/cache@v3 | ||
| 137 | - with: | ||
| 138 | - path: ~/.npm | ||
| 139 | - key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} | ||
| 140 | - restore-keys: ${{runner.os}}-npm- | ||
| 141 | - - run: npm ci | ||
| 126 | + - uses: ./.github/actions/install-dependencies | ||
| 142 | 127 | - id: user-agent-default | |
| 143 | 128 | name: Default user-agent not set | |
| 144 | 129 | uses: ./ | |
@@ -195,12 +180,7 @@ jobs: | |||
| 195 | 180 | runs-on: ubuntu-latest | |
| 196 | 181 | steps: | |
| 197 | 182 | - uses: actions/checkout@v3 | |
| 198 | - - uses: actions/cache@v3 | ||
| 199 | - with: | ||
| 200 | - path: ~/.npm | ||
| 201 | - key: ${{runner.os}}-npm-${{hashFiles('**/package-lock.json')}} | ||
| 202 | - restore-keys: ${{runner.os}}-npm- | ||
| 203 | - - run: npm ci | ||
| 183 | + - uses: ./.github/actions/install-dependencies | ||
| 204 | 184 | - id: debug-default | |
| 205 | 185 | name: Default debug not set | |
| 206 | 186 | uses: ./ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,5 +20,5 @@ jobs: | |||
| 20 | 20 | - uses: jonabc/setup-licensed@82c5f4d19e8968efa74a25b132922382c2671fe2 | |
| 21 | 21 | with: | |
| 22 | 22 | version: '3.x' | |
| 23 | - - run: npm ci | ||
| 23 | + - uses: ./.github/actions/install-dependencies | ||
| 24 | 24 | - run: licensed status | |
| Back | FazBrowse Home | New Git URL |
0 commit comments