chore(deps): update dependency eslint-plugin-jest to v27.6.1 #2672
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
pull_request_review: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
files_changed: ${{ steps.changed_files.outputs.files_changed }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
- name: Use Node.js 16.x | |
uses: actions/setup-node@v4.0.1 | |
with: | |
cache: 'yarn' | |
node-version: '16.x' | |
- name: Create coverage directory and clover.xml | |
run: | | |
mkdir -p coverage | |
touch coverage/clover.xml | |
- name: Install dependencies | |
run: | | |
yarn install | |
- name: Run eslint on changed files | |
uses: tj-actions/eslint-changed-files@v21 | |
with: | |
token: ${{ secrets.PAT_TOKEN }} | |
config_path: ".eslintrc.json" | |
ignore_path: ".eslintignore" | |
- name: Run build and test | |
run: | | |
yarn all | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v17 | |
id: changed_files | |
with: | |
files: | | |
src | |
dist | |
- name: Commit files | |
if: steps.changed_files.outputs.files_changed == 'true' | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add src dist | |
git commit -m "Added missing changes and modified dist assets." | |
- name: Push changes | |
if: steps.changed_files.outputs.files_changed == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PAT_TOKEN }} | |
branch: ${{ github.head_ref }} | |
- name: Upload build assets | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-assets | |
path: dist | |
- name: Run codacy-coverage-reporter | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
continue-on-error: true | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: coverage/lcov.info | |
test: | |
needs: build | |
if: needs.build.outputs.files_changed != 'true' | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Download build assets | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-assets | |
- name: Run glob for all files | |
id: glob-all-files | |
uses: ./ | |
with: | |
files: "**" | |
include-deleted-files: "true" | |
base-sha: "99561ef" | |
sha: "2eb2427" | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-all-files.outputs.paths }}" | |
cat "${{ steps.glob-all-files.outputs.paths-output-file }}" | |
- name: Run glob for yml files | |
id: glob-yml-files | |
uses: ./ | |
with: | |
files: | | |
**.yml | |
!.github/**/rebase.yml | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-yml-files.outputs.paths }}" | |
cat "${{ steps.glob-yml-files.outputs.paths-output-file }}" | |
- name: Run glob for all yml files | |
id: glob-all-yml-files | |
uses: ./ | |
with: | |
files: | | |
**/*.yml | |
excluded-files: | | |
.github/workflow/rebase.yml | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-all-yml-files.outputs.paths }}" | |
cat "${{ steps.glob-all-yml-files.outputs.paths-output-file }}" | |
- name: Run glob for test.yml and md files | |
uses: ./ | |
id: glob-test-yml-md | |
with: | |
files: | | |
.github/workflows/test.yml | |
*.md | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-test-yml-md.outputs.paths }}" | |
cat "${{ steps.glob-test-yml-md.outputs.paths-output-file }}" | |
- name: Run glob for source-files.txt escape paths | |
uses: ./ | |
id: glob-source-files-escape-paths | |
with: | |
files-from-source-file: | | |
src/__tests__/source-files.txt | |
src/__tests__/source-files.txt | |
escape-paths: true | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-source-files-escape-paths.outputs.paths }}" | |
cat "${{ steps.glob-source-files-escape-paths.outputs.paths-output-file }}" | |
- name: Run glob for source-files.txt | |
uses: ./ | |
id: glob-source-files | |
with: | |
files-from-source-file: | | |
src/__tests__/source-files.txt | |
src/__tests__/source-files.txt | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-source-files.outputs.paths }}" | |
cat "${{ steps.glob-source-files.outputs.paths-output-file }}" | |
- name: Run glob excluding files in source-files.txt | |
uses: ./ | |
id: glob-excluded-source-files | |
with: | |
excluded-files-from-source-file: | | |
src/__tests__/source-files.txt | |
src/__tests__/source-files.txt | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-excluded-source-files.outputs.paths }}" | |
cat "${{ steps.glob-excluded-source-files.outputs.paths-output-file }}" | |
- name: Run glob for test.yml and md files and custom separator | |
uses: ./ | |
id: glob-test-yml-md-separator | |
with: | |
files: ".github/workflows/test.yml *.md" | |
files-separator: " " | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-test-yml-md-separator.outputs.paths }}" | |
cat "${{ steps.glob-test-yml-md-separator.outputs.paths-output-file }}" | |
- name: Run glob for all .yml files and excluding test.yml and custom separator | |
uses: ./ | |
id: glob-excluded-test-yml-separator | |
with: | |
files: "**.yml **/*.yml" | |
files-separator: " " | |
excluded-files: ".github/workflows/test.yml" | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-excluded-test-yml-separator.outputs.paths }}" | |
cat "${{ steps.glob-excluded-test-yml-separator.outputs.paths-output-file }}" | |
- name: Run glob with invalid patterns | |
uses: ./ | |
id: glob-invalid | |
continue-on-error: true | |
with: | |
files: | | |
- *.md | |
- name: Show output | |
run: | | |
echo "${{ steps.glob-invalid.outputs.paths }}" | |
echo "${{ steps.glob-invalid.outputs.paths-output-file }}" | |
- name: Verify that the paths-output-file is created | |
if: steps.glob-invalid.outputs.paths-output-file == '' | |
run: | | |
echo "Expected: paths-output-file to not be empty got ${{ steps.glob-invalid.outputs.paths-output-file }}" | |
exit 1 |