mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
build: run test on GitHub Actions
This commit is contained in:
parent
184a91875a
commit
33eac8a8bc
3 changed files with 22 additions and 9 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: Build
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -13,12 +13,18 @@ on:
|
|||
- 'server/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Retrieve vscode icons
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'vscode-icons/vscode-icons'
|
||||
path: 'vscode-icons'
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
|
@ -32,13 +38,19 @@ jobs:
|
|||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Retrieve vscode icons
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'vscode-icons/vscode-icons'
|
||||
path: 'vscode-icons'
|
||||
- name: Install deps
|
||||
env:
|
||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
|
||||
run: |
|
||||
yarn
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
yarn
|
||||
make build
|
||||
|
||||
- name: Test
|
||||
uses: mujo-code/puppeteer-headful@master
|
||||
env:
|
||||
CI: 'true'
|
||||
with:
|
||||
args: yarn test
|
||||
|
|
@ -4,6 +4,7 @@ const CRX_PATH = path.resolve(__dirname, 'dist')
|
|||
|
||||
module.exports = {
|
||||
launch: {
|
||||
executablePath: process.env.PUPPETEER_EXEC_PATH, // set by mujo-code/puppeteer-headful
|
||||
headless: false, // required for extensions
|
||||
args: [`--disable-extensions-except=${CRX_PATH}`, `--load-extension=${CRX_PATH}`],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ module.exports = {
|
|||
testMatch: ['**/__tests__/cases/*.ts?(x)', '**/?(*.)+(spec|test).ts?(x)'],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
||||
testPathIgnorePatterns: ['/node_modules/', './*.d.ts'],
|
||||
testPathIgnorePatterns: ['/node_modules/', '.d.ts$', '<rootDir>/vscode-icons/'],
|
||||
|
||||
// The regexp pattern or array of patterns that Jest uses to detect test files
|
||||
// testRegex: [],
|
||||
|
|
|
|||
Loading…
Reference in a new issue