mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-04 18:58:39 +00:00
* build: move font generation to the main repo * Update fonts * chore: remove submodules * Update paths * Update fonts.yml Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
87 lines
1.9 KiB
YAML
87 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
!contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
|
|
!contains(toJSON(github.event.commits.*.message), '[ci skip]')
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false # minimize exposure and prevent accidental pushes
|
|
|
|
- name: Use Node.js 12.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12'
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
.yarn/cache
|
|
.pnp.js
|
|
key: yarn-deps-v1-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: |
|
|
yarn-deps-v1-
|
|
|
|
- name: Install dependencies
|
|
run: yarn --immutable
|
|
env:
|
|
YARN_ENABLE_SCRIPTS: 0 # disable postinstall scripts
|
|
|
|
- name: Lint code
|
|
run: yarn test:lint
|
|
|
|
- name: Run Flow
|
|
run: yarn test:flow
|
|
if: always()
|
|
|
|
- name: Run Jest tests
|
|
run: yarn test:jest --coverage
|
|
if: always()
|
|
|
|
- uses: codecov/codecov-action@v1
|
|
with:
|
|
directory: ./coverage/
|
|
timeout-minutes: 3
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push'
|
|
environment: release
|
|
needs: test
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Use Node.js 12.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12'
|
|
|
|
- name: Cache dependencies
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
.yarn/cache
|
|
.pnp.js
|
|
key: yarn-deps-v1-${{ hashFiles('yarn.lock') }}
|
|
restore-keys: |
|
|
yarn-deps-v1-
|
|
- name: Run semantic-release
|
|
run: yarn run semantic-release --debug
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|