ci(root): updated github action deps #452
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: Develop | |
on: | |
push: | |
branches: | |
- develop | |
concurrency: | |
group: ci-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check-updates: | |
name: "Check package updates" | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
core: ${{ steps.filter.outputs.core }} | |
canary: ${{ steps.filter.outputs.canary }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
core: | |
- './packages/web-components/**' | |
- './packages/react/**' | |
canary: | |
- './packages/canary-web-components/**' | |
- './packages/canary-react/**' | |
ic-ui-kit-static-analysis-tests: | |
needs: [check-updates] | |
name: "Static analysis tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install core dependencies | |
if: ${{ needs.check-updates.outputs.canary == 'false' }} | |
run: | | |
npm ci --legacy-peer-deps | |
npm run bootstrap -- -- --ci --legacy-peer-deps | |
npm run build | |
- name: Install all dependencies | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
run: | | |
npm ci --legacy-peer-deps | |
npm run bootstrap -- -- --ci --legacy-peer-deps | |
npm run build:all | |
- name: Lint commit messages | |
run: | | |
COMMIT_MESSAGE=$(git log -1 --pretty=format:"%s") | |
echo "$COMMIT_MESSAGE" | npx commitlint | |
- name: Lint | |
run: npm run lint | |
- name: Prettier | |
run: npm run prettier | |
- name: Audit | |
run: npm run audit:bypass-expiry | |
- name: A11y core tests | |
if: ${{ needs.check-updates.outputs.core == 'true' }} | |
run: npm run test-a11y:ci | |
- name: A11y canary tests | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
run: npm run test-a11y:ci:canary | |
- name: Unit Component tests | |
run: npm run test:coverage-ci | |
ic-ui-kit-e2e-tests: | |
needs: [check-updates] | |
name: "E2E tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm ci --legacy-peer-deps | |
npm run bootstrap -- -- --ci --legacy-peer-deps | |
- name: E2E core tests | |
if: ${{ needs.check-updates.outputs.core == 'true' }} | |
run: npm run test-e2e | |
- name: E2E canary tests | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
run: npm run test-e2e:canary | |
ic-ui-kit-visual-tests: | |
needs: [check-updates] | |
name: "Visual regression tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: browser-actions/setup-chrome@latest | |
- name: Install dependencies | |
run: | | |
google-chrome --version | |
npm ci --legacy-peer-deps | |
npm run bootstrap -- -- --ci --legacy-peer-deps | |
- name: Core visual regression tests | |
if: ${{ needs.check-updates.outputs.core == 'true' }} | |
run: npm run test-visual:ci | |
- name: Canary visual regression tests | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
run: npm run test-visual:ci:canary | |
ic-ui-kit-cypress-tests: | |
needs: [check-updates] | |
name: "Cypress tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- uses: browser-actions/setup-chrome@latest | |
- name: Install dependencies | |
run: | | |
google-chrome --version | |
npm ci --legacy-peer-deps | |
npm run bootstrap -- -- --ci --legacy-peer-deps | |
- name: Cypress tests | |
id: cypress_tests | |
run: npm run test-cypress:ci | |
- name: Upload diff screenshots | |
if: always() && steps.cypress_tests.outcome == 'failure' | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./packages/react/cypress-visual-screenshots/diff | |
target-folder: ./branches/develop/cypress-screenshots | |
ic-ui-kit-deploy-core: | |
needs: | |
[ | |
ic-ui-kit-static-analysis-tests, | |
ic-ui-kit-e2e-tests, | |
ic-ui-kit-visual-tests, | |
check-updates, | |
ic-ui-kit-cypress-tests, | |
] | |
name: "Deploy QA Storybook" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: | | |
npm ci --legacy-peer-deps | |
npm run bootstrap -- -- --ci --legacy-peer-deps | |
- name: Build core components | |
if: ${{ needs.check-updates.outputs.canary == 'false' }} | |
run: | | |
npm run build | |
- name: Build all components | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
run: | | |
npm run build:all | |
- name: Build web-components and react storybook | |
if: ${{ needs.check-updates.outputs.core == 'true' }} | |
run: | | |
npm run build-storybook:web-components | |
npm run build-storybook:react | |
- name: Build canary web-components and canary react storybook | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
run: | | |
npm run build-storybook:canary-web-components | |
npm run build-storybook:canary-react | |
- name: Deploy web components storybook | |
if: ${{ needs.check-updates.outputs.core == 'true' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./packages/web-components/storybook-static | |
target-folder: ./branches/develop/web-components | |
- name: Deploy react storybook | |
if: ${{ needs.check-updates.outputs.core == 'true' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./packages/react/storybook-static | |
target-folder: ./branches/develop/react | |
- name: Deploy canary web components storybook | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./packages/canary-web-components/storybook-static | |
target-folder: ./branches/canary/develop/web-components | |
- name: Deploy canary react storybook | |
if: ${{ needs.check-updates.outputs.canary == 'true' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: ./packages/canary-react/storybook-static | |
target-folder: ./branches/canary/develop/react |