feat(local-storage): enhance local storage availability checks FE-1221 #506
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 | |
- uses: FuelLabs/github-actions/setups/node@master | |
with: | |
pnpm-version: 9.5.0 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Check Changesets | |
run: | | |
# First ensure we're on the PR branch | |
git checkout -b pr-branch ${{ github.event.pull_request.head.sha }} | |
echo "Current branch:" | |
git branch --show-current | |
echo "\nRemote branches:" | |
git branch -r | |
echo "\nTrying to fetch main:" | |
git fetch origin main:main | |
echo "\nChecking commits:" | |
echo "Main commit: $(git rev-parse main)" | |
echo "Current commit: $(git rev-parse HEAD)" | |
echo "\nRunning changeset check:" | |
pnpm changeset status --since origin/main | |
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 }} |