mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-24 21:15:51 +01:00
chore: migrate e2e test to github actions (#2109)
* chore: migrate e2e test to github actions * chore: remove circle ci
This commit is contained in:
parent
e9a55005be
commit
ff6b47cad1
@ -1,171 +0,0 @@
|
||||
version: 2.1
|
||||
|
||||
executors:
|
||||
node_latest_browser:
|
||||
docker:
|
||||
- image: circleci/node:latest-browsers
|
||||
node_latest:
|
||||
docker:
|
||||
- image: circleci/node:13
|
||||
node_lts_12:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
node_lts_10:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
default_executor: node_latest
|
||||
|
||||
aliases:
|
||||
- &repo_path
|
||||
~/verdaccio
|
||||
- &defaults
|
||||
working_directory: *repo_path
|
||||
- &yarn_cache_key
|
||||
yarn-sha-{{ checksum "yarn.lock" }}
|
||||
- &coverage_key
|
||||
coverage-{{ .Branch }}-{{ .Revision }}
|
||||
- &ignore_non_dev_branches
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
branches:
|
||||
ignore:
|
||||
- gh-pages
|
||||
- l10n_master
|
||||
- /release\/.*/
|
||||
|
||||
commands:
|
||||
restore_repo:
|
||||
description: Restore repository from workspace
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: *repo_path
|
||||
run_test:
|
||||
description: Run test and functional test
|
||||
steps:
|
||||
- run:
|
||||
name: Test
|
||||
command: yarn run test
|
||||
- run:
|
||||
name: Functional test
|
||||
command: yarn test:functional
|
||||
- store_test_results:
|
||||
path: reports/
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
<<: *defaults
|
||||
executor: default_executor
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: *yarn_cache_key
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: yarn install --immutable
|
||||
- run:
|
||||
name: Prepare CI
|
||||
command: yarn run pre:ci
|
||||
- run:
|
||||
name: Build project
|
||||
command: yarn run code:build
|
||||
- save_cache:
|
||||
key: *yarn_cache_key
|
||||
paths:
|
||||
- ~/.yarn
|
||||
- ~/.cache/yarn
|
||||
- node_modules
|
||||
- persist_to_workspace:
|
||||
root: *repo_path
|
||||
paths:
|
||||
- ./*
|
||||
|
||||
test_node_latest:
|
||||
<<: *defaults
|
||||
executor: node_latest
|
||||
steps:
|
||||
- restore_repo
|
||||
- run_test
|
||||
- save_cache:
|
||||
key: *coverage_key
|
||||
paths:
|
||||
- coverage
|
||||
test_node_lts_12:
|
||||
<<: *defaults
|
||||
executor: node_lts_12
|
||||
steps:
|
||||
- restore_repo
|
||||
- run_test
|
||||
test_node_lts_10:
|
||||
<<: *defaults
|
||||
executor: node_lts_10
|
||||
steps:
|
||||
- restore_repo
|
||||
- run_test
|
||||
test_e2e:
|
||||
<<: *defaults
|
||||
executor: node_latest_browser
|
||||
steps:
|
||||
- restore_repo
|
||||
- run:
|
||||
name: Test End-to-End
|
||||
command: yarn run test:e2e
|
||||
test_e2e_cli:
|
||||
<<: *defaults
|
||||
executor: node_latest
|
||||
steps:
|
||||
- restore_repo
|
||||
- run:
|
||||
name: Test End-to-End ClI
|
||||
command: yarn run test:e2e:cli
|
||||
|
||||
coverage:
|
||||
<<: *defaults
|
||||
executor: default_executor
|
||||
steps:
|
||||
- restore_repo
|
||||
- restore_cache:
|
||||
key: *coverage_key
|
||||
- run:
|
||||
name: Publish coverage
|
||||
command: yarn run coverage:publish
|
||||
- store_artifacts:
|
||||
path: coverage
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
workflow:
|
||||
jobs:
|
||||
- prepare:
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node_latest:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node_lts_12:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_node_lts_10:
|
||||
requires:
|
||||
- prepare
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_e2e:
|
||||
requires:
|
||||
- prepare
|
||||
- test_node_latest
|
||||
- test_node_lts_10
|
||||
- test_node_lts_12
|
||||
<<: *ignore_non_dev_branches
|
||||
- test_e2e_cli:
|
||||
requires:
|
||||
- prepare
|
||||
- test_node_latest
|
||||
- test_node_lts_10
|
||||
- test_node_lts_12
|
||||
<<: *ignore_non_dev_branches
|
||||
- coverage:
|
||||
requires:
|
||||
- test_e2e
|
||||
- test_e2e_cli
|
||||
<<: *ignore_non_dev_branches
|
27
.github/workflows/ci-e2e-ui.yml
vendored
Normal file
27
.github/workflows/ci-e2e-ui.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: E2E UI
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node_version: [14]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node_version: ${{ matrix.node_version }}
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
- name: Build
|
||||
run: yarn code:build
|
||||
- name: Test UI
|
||||
run: yarn run test:e2e
|
27
.github/workflows/ci-e2e.yml
vendored
Normal file
27
.github/workflows/ci-e2e.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: E2E CLI
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node_version: [14]
|
||||
|
||||
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.1
|
||||
- name: Use Node ${{ matrix.node_version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node_version: ${{ matrix.node_version }}
|
||||
- name: Install
|
||||
run: yarn install --immutable
|
||||
- name: Build
|
||||
run: yarn code:build
|
||||
- name: Test CLI
|
||||
run: yarn run test:e2e:cli
|
Loading…
Reference in New Issue
Block a user