| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1df8dbe commit caaa9d7
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,20 +12,7 @@ on: | |||
| 12 | 12 | - '**.md' | |
| 13 | 13 | ||
| 14 | 14 | jobs: | |
| 15 | - build: | ||
| 16 | - runs-on: ${{ matrix.os }} | ||
| 17 | - strategy: | ||
| 18 | - fail-fast: false | ||
| 19 | - matrix: | ||
| 20 | - os: [ubuntu-latest, windows-latest, macos-latest] | ||
| 21 | - steps: | ||
| 22 | - - uses: actions/checkout@v3 | ||
| 23 | - - name: Setup Node.JS 16 | ||
| 24 | - uses: actions/setup-node@v3 | ||
| 25 | - with: | ||
| 26 | - node-version: 16.x | ||
| 27 | - cache: npm | ||
| 28 | - - run: npm ci | ||
| 29 | - - run: npm run build | ||
| 30 | - - run: npm run format-check | ||
| 31 | - - run: npm test | ||
| 15 | + call-basic-validation: | ||
| 16 | + name: Basic validation | ||
| 17 | + #uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main | ||
| 18 | + uses: IvanZosimov/reusable-workflows/.github/workflows/basic-validation.yml@main | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,3 @@ | |||
| 1 | - # `dist/index.js` is a special file in Actions. | ||
| 2 | - # When you reference an action with `uses:` in a workflow, | ||
| 3 | - # `index.js` is the code that will run. | ||
| 4 | - # For our project, we generate this file through a build process from other source files. | ||
| 5 | - # We need to make sure the checked-in `index.js` actually matches what we expect it to be. | ||
| 6 | 1 | name: Check dist/ | |
| 7 | 2 | ||
| 8 | 3 | on: | |
@@ -17,36 +12,7 @@ on: | |||
| 17 | 12 | workflow_dispatch: | |
| 18 | 13 | ||
| 19 | 14 | jobs: | |
| 20 | - check-dist: | ||
| 21 | - runs-on: ubuntu-latest | ||
| 22 | - | ||
| 23 | - steps: | ||
| 24 | - - uses: actions/checkout@v3 | ||
| 25 | - | ||
| 26 | - - name: Set Node.js 16.x | ||
| 27 | - uses: actions/setup-node@v3 | ||
| 28 | - with: | ||
| 29 | - node-version: 16.x | ||
| 30 | - cache: npm | ||
| 31 | - | ||
| 32 | - - name: Install dependencies | ||
| 33 | - run: npm ci | ||
| 34 | - | ||
| 35 | - - name: Rebuild the dist/ directory | ||
| 36 | - run: npm run build | ||
| 37 | - | ||
| 38 | - - name: Compare the expected and actual dist/ directories | ||
| 39 | - run: | | ||
| 40 | - if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
| 41 | - echo "Detected uncommitted changes after build. See status below:" | ||
| 42 | - git diff | ||
| 43 | - exit 1 | ||
| 44 | - fi | ||
| 45 | - id: diff | ||
| 46 | - | ||
| 47 | - # If index.js was different than expected, upload the expected version as an artifact | ||
| 48 | - - uses: actions/upload-artifact@v3 | ||
| 49 | - if: ${{ failure() && steps.diff.conclusion == 'failure' }} | ||
| 50 | - with: | ||
| 51 | - name: dist | ||
| 52 | - path: dist/ | ||
| 15 | + call-check-dist: | ||
| 16 | + name: Check dist/ | ||
| 17 | + #uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main | ||
| 18 | + uses: IvanZosimov/reusable-workflows/.github/workflows/check-dist.yml@main | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,14 @@ | |||
| 1 | + name: CodeQL analysis | ||
| 2 | + on: | ||
| 3 | + push: | ||
| 4 | + branches: [ main ] | ||
| 5 | + pull_request: | ||
| 6 | + branches: [ main ] | ||
| 7 | + schedule: | ||
| 8 | + - cron: '0 3 * * 0' | ||
| 9 | + | ||
| 10 | + jobs: | ||
| 11 | + call-codeQL-analysis: | ||
| 12 | + name: CodeQL analysis | ||
| 13 | + #uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main | ||
| 14 | + uses: IvanZosimov/reusable-workflows/.github/workflows/codeql-analysis.yml@main | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,16 +10,7 @@ on: | |||
| 10 | 10 | workflow_dispatch: | |
| 11 | 11 | ||
| 12 | 12 | jobs: | |
| 13 | - test: | ||
| 14 | - runs-on: ubuntu-latest | ||
| 15 | - name: Check licenses | ||
| 16 | - steps: | ||
| 17 | - - uses: actions/checkout@v3 | ||
| 18 | - - run: npm ci | ||
| 19 | - - name: Install licensed | ||
| 20 | - run: | | ||
| 21 | - cd $RUNNER_TEMP | ||
| 22 | - curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/3.4.4/licensed-3.4.4-linux-x64.tar.gz | ||
| 23 | - sudo tar -xzf licensed.tar.gz | ||
| 24 | - sudo mv licensed /usr/local/bin/licensed | ||
| 25 | - - run: licensed status | ||
| 13 | + call-licensed: | ||
| 14 | + name: Licensed | ||
| 15 | + #uses: actions/reusable-workflows/.github/workflows/licensed.yml@main | ||
| 16 | + uses: IvanZosimov/reusable-workflows/.github/workflows/licensed.yml@main | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ | |||
| 8 | 8 | "build": "ncc build -o dist/setup src/setup-java.ts && ncc build -o dist/cleanup src/cleanup-java.ts", | |
| 9 | 9 | "format": "prettier --write \"{,!(node_modules)/**/}*.ts\"", | |
| 10 | 10 | "format-check": "prettier --check \"{,!(node_modules)/**/}*.ts\"", | |
| 11 | + "lint": "", | ||
| 11 | 12 | "prerelease": "npm run-script build", | |
| 12 | 13 | "release": "git add -f dist/setup/index.js dist/cleanup/index.js", | |
| 13 | 14 | "test": "jest" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments