Skip to content

feat(tag): new tedi-ready component #297 #161

feat(tag): new tedi-ready component #297

feat(tag): new tedi-ready component #297 #161

name: Test and lint Angular
on:
pull_request:
branches:
- main
- rc
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Lint
run: |
npm ci --cache .npm --prefer-offline
npm run lint
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Build library
run: |
npm ci --cache .npm --prefer-offline
npm run build
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Test
run: |
npm ci --cache .npm --prefer-offline
npm run test
test-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v4
- name: Install dependencies
run: |
npm ci --cache .npm --prefer-offline
- name: Run coverage tests
run: |
npm run test:coverage
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: ./
chromatic:
runs-on: ubuntu-latest
if: |
(
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.draft == false &&
github.actor != 'dependabot[bot]'
) || (
github.event_name == 'push' &&
github.ref == 'refs/heads/rc'
)
steps:
- name: Checkout with branch context
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }}
- name: Fetch baseline branch (rc)
run: git fetch origin rc
- name: Set up Node
uses: actions/setup-node@v4
- name: Install dependencies
run: |
npm ci --cache .npm --prefer-offline
- name: Build Storybook
run: |
npm run build:sb
- name: Publish to Chromatic
run: |
echo "CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_TOKEN }}"
CHROMATIC_PROJECT_TOKEN=${{ secrets.CHROMATIC_TOKEN }} npm run chromatic