Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

update style

update style #2556

Workflow file for this run

name: Qwant Maps - CI
on: [push]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Init summary markown
run: echo '# πŸ—Ί Qwant Maps - Build summary' >> $GITHUB_STEP_SUMMARY
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -yq libstdc++6 gettext jq
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.14.2'
- name: Install NPM and npm dependencies
run: |
npm install -g npm@8.5.0
npm ci
- name: Run build
run: |
TEST=true npm run build -- --mode=production
echo "- ## πŸ€– Project build" >> $GITHUB_STEP_SUMMARY
echo "βœ… Success" >> $GITHUB_STEP_SUMMARY
- name: Run ESLint
run: |
npm run lint
echo "- ## πŸ€– ESLint" >> $GITHUB_STEP_SUMMARY
echo "βœ… Success" >> $GITHUB_STEP_SUMMARY
- name: Run TypeScript migration files count
run: |
echo "- ## πŸ€– TypeScript migration" >> $GITHUB_STEP_SUMMARY
npm run ts:count >> $GITHUB_STEP_SUMMARY
- name: Run TypeScript coverage
id: tscov
run: |
echo "- ## πŸ€– TypeScript coverage" >> $GITHUB_STEP_SUMMARY
npm run ts:coverage
echo "πŸ“Š Total coverage: $(cat coverage-ts/typescript-coverage.json | jq '.percentage')% - Details: $(cat coverage-ts/typescript-coverage.json | jq '.covered')/$(cat coverage-ts/typescript-coverage.json | jq '.total') lines covered" >> $GITHUB_STEP_SUMMARY
- name: Run unit tests
run: |
npm run unit-test
echo "- ## πŸ€– Unit tests" >> $GITHUB_STEP_SUMMARY
echo "βœ… Success" >> $GITHUB_STEP_SUMMARY
echo "πŸ“Š Lines coverage: $(cat coverage/coverage-summary.json | jq '.total.lines.pct')% - Details: $(cat coverage/coverage-summary.json | jq '.total.lines.covered')/$(cat coverage/coverage-summary.json | jq '.total.lines.total') lines covered" >> $GITHUB_STEP_SUMMARY
echo "πŸ“Š Statements coverage: $(cat coverage/coverage-summary.json | jq '.total.statements.pct')% - Details: $(cat coverage/coverage-summary.json | jq '.total.statements.covered')/$(cat coverage/coverage-summary.json | jq '.total.statements.total') statements covered" >> $GITHUB_STEP_SUMMARY
echo "πŸ“Š Functions coverage: $(cat coverage/coverage-summary.json | jq '.total.functions.pct')% - Details: $(cat coverage/coverage-summary.json | jq '.total.functions.covered')/$(cat coverage/coverage-summary.json | jq '.total.functions.total') functions covered" >> $GITHUB_STEP_SUMMARY
echo "πŸ“Š Branches coverage: $(cat coverage/coverage-summary.json | jq '.total.branches.pct')% - Details: $(cat coverage/coverage-summary.json | jq '.total.branches.covered')/$(cat coverage/coverage-summary.json | jq '.total.branches.total') branches covered" >> $GITHUB_STEP_SUMMARY
- name: Run integration tests
run: |
npm run integration-test
echo "- ## πŸ€– Integration tests" >> $GITHUB_STEP_SUMMARY
echo "βœ… Success" >> $GITHUB_STEP_SUMMARY
- name: Deploy Storybook
if: "contains(github.ref_name, 'master')"
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy-storybook -- -u "github-actions-bot <support+actions@github.com>"
echo "- ## 🎨 Storybook"
echo "- βœ… Successfully deployed to [https://qwant.github.io/erdapfel/](https://qwant.github.io/erdapfel/) πŸš€" >> $GITHUB_STEP_SUMMARY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}