feat(local-storage): enhance local storage availability checks FE-1221 #500
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: "PR Checks" | |
on: | |
pull_request: | |
types: [opened, synchronize, edited, closed] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
env: | |
COVERAGE_FILE: ./coverage/report.json | |
jobs: | |
validate-title: | |
name: Validate PR Title | |
runs-on: ubuntu-latest | |
steps: | |
- uses: amannn/action-semantic-pull-request@v4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
check-packages-changed: | |
name: Assign project changed | |
runs-on: ubuntu-latest | |
outputs: | |
changed: ${{ steps.packages-changed.outputs.any_changed }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check external packages changes | |
id: packages-changed | |
uses: tj-actions/changed-files@v22.2 | |
with: | |
files: | | |
**/packages/** | |
changesets: | |
name: Changeset Checks | |
needs: check-packages-changed | |
if: ${{ github.head_ref != 'changeset-release/main' && needs.check-packages-changed.outputs.changed == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.sha }} | |
# Fetch and checkout main branch | |
- name: Fetch main branch | |
run: | | |
git remote set-branches --add origin main | |
git fetch origin main | |
git checkout origin/main -b main | |
git checkout ${{ github.event.pull_request.head.sha }} | |
# Check for changeset files | |
- name: Check for changeset files | |
id: check-changeset | |
run: | | |
if [ -z "$(ls -A .changeset/*.md 2>/dev/null)" ]; then | |
echo "No changeset file found" | |
exit 1 | |
else | |
echo "Changeset file(s) found" | |
fi | |
- uses: FuelLabs/github-actions/setups/node@master | |
with: | |
pnpm-version: 9.5.0 | |
- run: pnpm install | |
audit: | |
name: Audit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: FuelLabs/github-actions/setups/node@master | |
with: | |
pnpm-version: 9.5.0 | |
- run: pnpm audit --prod | |
lint-build: | |
name: Lint & Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: FuelLabs/github-actions/setups/node@master | |
with: | |
pnpm-version: 9.5.0 | |
- run: | | |
pnpm lint | |
pnpm build | |
test: | |
name: Tests with coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: FuelLabs/github-actions/setups/node@master | |
with: | |
pnpm-version: 9.5.0 | |
- name: Checking PR Number | |
uses: jwalton/gh-find-current-pr@v1 | |
id: findPr | |
- name: Run Jest Tests | |
run: | | |
pnpm test:ci --outputFile="${{ env.COVERAGE_FILE }}" | |
- name: Publish coverage | |
uses: artiomtr/jest-coverage-report-action@v2.0.5 | |
if: ${{ steps.findPr.outputs.number }} | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
package-manager: pnpm | |
annotations: failed-tests | |
test-script: pnpm test:ci | |
prnumber: ${{ steps.findPr.outputs.number }} | |
skip-test: all | |
coverage-file: ${{ env.COVERAGE_FILE }} | |
base-coverage-file: ${{ env.COVERAGE_FILE }} |