mirror of
https://github.com/selfxyz/self.git
synced 2026-01-13 00:28:17 -05:00
44 lines
978 B
YAML
44 lines
978 B
YAML
name: Test and Coverage
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
paths:
|
|
- "app/**"
|
|
- ".github/workflows/test-coverage.yml"
|
|
pull_request:
|
|
branches: [main, dev]
|
|
paths:
|
|
- "app/**"
|
|
- ".github/workflows/test-coverage.yml"
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
cache: "yarn"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
yarn install
|
|
yarn build:deps
|
|
working-directory: ./app
|
|
|
|
- name: Run tests with coverage
|
|
run: yarn test:coverage:ci
|
|
working-directory: ./app
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v4
|
|
with:
|
|
file: ./app/coverage/lcov.info
|
|
flags: screens,stores,providers,components,utils,hooks,navigation,layouts
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|