Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: ant-design
open_collective: ant-design
43 changes: 43 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CodeQL

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '17 18 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [javascript]

steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@411bbbe57033eedfc1a82d68c01345aa96c737d7
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@411bbbe57033eedfc1a82d68c01345aa96c737d7
Comment thread
afc163 marked this conversation as resolved.

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@411bbbe57033eedfc1a82d68c01345aa96c737d7
with:
category: '/language:${{ matrix.language }}'
114 changes: 8 additions & 106 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,113 +1,15 @@
name: CI
name: ✅ test

on:
push:
branches: [master, 3.0]
branches: [master]
pull_request:
branches: [master]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- uses: actions/setup-node@v1
with:
node-version: '12'

- name: cache package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only

- name: hack for singe file
run: |
if [ ! -d "package-temp-dir" ]; then
mkdir package-temp-dir
fi
cp package-lock.json package-temp-dir
- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci

lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: lint
run: npm run lint
permissions:
contents: read

needs: setup

compile:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: compile
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: coverage
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash)

needs: setup
jobs:
test:
uses: react-component/rc-test/.github/workflows/test-utoo.yml@b8ebddc81ef706b50faff0242ab34ad8ecdd9a59
secrets: inherit
Comment thread
afc163 marked this conversation as resolved.
25 changes: 25 additions & 0 deletions .github/workflows/react-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: React Doctor

on:
pull_request:
branches: [master]

permissions:
contents: read
pull-requests: write

concurrency:
group: react-doctor-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
react-doctor:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false

- uses: millionco/react-doctor@0b4f4f4bd248a154e64eb508a48347f71154b3f3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/surge-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Surge Preview

on:
pull_request:
branches: [master]

permissions:
contents: read
pull-requests: write
statuses: write

concurrency:
group: surge-preview-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false

- name: Install dependencies
run: npm install --legacy-peer-deps --ignore-scripts --no-audit --loglevel=warn

- name: Build preview
if: ${{ secrets.SURGE_TOKEN != '' }}
run: npm run build
- uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
if: ${{ secrets.SURGE_TOKEN != '' }}
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
with:
dist: docs-dist
failOnError: false
github_token: ${{ secrets.GITHUB_TOKEN }}
surge_token: ${{ env.SURGE_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ coverage
yarn.lock
package-lock.json
.vscode
.doc
.vercel
# production
/dist
/docs-dist
Expand All @@ -43,3 +43,4 @@ package-lock.json
.umi-test
.env.local
src/.umi
src/.umi-production
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
package.json
.umi
.umi-production
.umi-test
.umi-test
src/.umi-production
docs-dist
build
10 changes: 7 additions & 3 deletions .umirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ import { defineConfig } from 'dumi';
const path = require('path');

export default defineConfig({
title: 'rc-tween-one',
title: '@rc-component/tween-one',
favicon: 'https://zos.alipayobjects.com/rmsportal/TOXWfHIUGHvZIyb.svg',
logo: 'https://zos.alipayobjects.com/rmsportal/TOXWfHIUGHvZIyb.svg',
outputPath: '.doc',
outputPath: 'docs-dist',
alias: {
'@rc-component/tween-one/es': path.join(__dirname, 'src'),
'@rc-component/tween-one/lib': path.join(__dirname, 'src'),
'@rc-component/tween-one': path.join(__dirname, 'src'),
'rc-tween-one/es': path.join(__dirname, 'src'),
'rc-tween-one/lib': path.join(__dirname, 'src'),
'rc-tween-one': path.join(__dirname, 'src'),
},
});
});
Loading
Loading