From daa891cb2ee6c3350ad26cc2f31b06edc1d83104 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 22 Mar 2020 21:21:09 +0100 Subject: [PATCH] github/workflows: move cli e2e test to separate workflow, prepare for running on windows as well --- .github/workflows/cli.yml | 49 ++++++++++++++++++++++++++++++++++ .github/workflows/frontend.yml | 17 ++---------- 2 files changed, 51 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/cli.yml diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml new file mode 100644 index 0000000000..31bf396f5f --- /dev/null +++ b/.github/workflows/cli.yml @@ -0,0 +1,49 @@ +name: CLI Test + +on: + pull_request: + paths: ['.github/workflows/cli.yml', 'packages/cli/**'] + types: [opened, reopened, edited, synchronize] + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [12.x] + + name: Node ${{ matrix.node-version }} on ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: find location of yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: use node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: yarn install + - run: yarn build + # This creates a new plugin and pollutes the workspace, so it should be run last. + - name: verify app serve and plugin creation + shell: bash + run: | + if [ "$RUNNER_OS" == "Linux" ]; then + sudo sysctl fs.inotify.max_user_watches=524288 + fi + node scripts/cli-e2e-test.js + - name: yarn lint, test after plugin creation + working-directory: plugins/test-plugin + run: | + yarn lint + yarn test + env: + CI: true diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 8b9f22a909..5c8e5c43b9 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -13,9 +13,8 @@ jobs: node-version: [12.x] steps: - - name: checkout code - uses: actions/checkout@v2 - - name: get yarn cache + - uses: actions/checkout@v2 + - name: find location of yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v1 @@ -36,15 +35,3 @@ jobs: yarn test env: CI: true - # This creates a new plugin and pollutes the workspace, so it should be run last. - - name: verify app serve and plugin creation - run: | - sudo sysctl fs.inotify.max_user_watches=524288 - node scripts/cli-e2e-test.js - - name: yarn lint, test after plugin creation - working-directory: plugins/test-plugin - run: | - yarn lint - yarn test - env: - CI: true