Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Node LTS and improve CI settings #437

Merged
merged 17 commits into from
Apr 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 19 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.2.4
codecov: codecov/codecov@3.2.2

executors:
Expand All @@ -11,20 +12,14 @@ executors:
default: false
version:
type: string
default: '16.13.1' # Specify LTS version for development
default: '16.14' # Specify LTS major and minor for development
docker:
- image: circleci/node:<< parameters.version >><<# parameters.browser >>-browsers<</ parameters.browser >>
entrypoint:
- docker-init
- --
- <<# parameters.browser >>/<</ parameters.browser >>docker-entrypoint.sh
command:
- /bin/sh
- image: cimg/node:<< parameters.version >><<# parameters.browser >>-browsers<</ parameters.browser >>
working_directory: ~/marp-cli

docker:
machine:
image: ubuntu-2004:202101-01
image: ubuntu-2004:202111-02
docker_layer_caching: true
working_directory: ~/marp-cli
environment:
Expand Down Expand Up @@ -66,12 +61,21 @@ commands:
- run: yarn -s check:audit

test:
parameters:
browser:
type: boolean
default: false
steps:
- run: node --version

- checkout
- install

- when:
condition: << parameters.browser >>
steps:
- browser-tools/install-chrome

- run:
name: Prettier formatting
command: yarn check:format
Expand Down Expand Up @@ -180,22 +184,25 @@ jobs:
browser: true
version: '12.22'
steps:
- test
- test:
browser: true

test-node14:
executor:
name: node
browser: true
version: '14.18'
steps:
- test
- test:
browser: true

test-node16:
executor:
name: node
browser: true
steps:
- test
- test:
browser: true

docker-build-latest:
executor: node
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
- pull_request
- push

# concurrency:
# group: ${{ github.workflow }}-${{ (github.ref_name == 'main' && github.run_id) || format('{0}-{1}', github.actor, github.head_ref || github.ref_name) }}
# cancel-in-progress: true

env:
YARN_VERSION: '^1.22.17'

Expand All @@ -17,9 +21,12 @@ jobs:
node-version:
- '^12.22.7'
- '^14.18.1'
- '16.14.0'
- '16.14.2'

steps:
# - name: Output concurrency group
# run: echo "${{ github.workflow }}-${{ (github.ref_name == 'main' && github.run_id) || format('{0}-{1}', github.actor, github.head_ref || github.ref_name) }}"

- uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -49,9 +56,9 @@ jobs:
# https://stackoverflow.com/a/59365905
- name: Jest
run: >-
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit ||
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --no-cache ||
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --no-cache
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --forceExit ||
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --forceExit --no-cache ||
yarn test:coverage --ci -i --reporters=default --reporters=jest-junit --forceExit --no-cache
env:
CI: true

Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14.0
16.14.2
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Bump Node LTS, and improve CI settings ([#437](https://github.com/marp-team/marp-cli/pull/437))

## v1.7.0 - 2022-02-23

### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16.14.0-alpine
FROM node:16.14.2-alpine
LABEL maintainer "Marp team"

RUN apk update && apk upgrade && \
Expand Down
2 changes: 1 addition & 1 deletion test/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { bare as bareTpl } from '../src/templates'
import { ThemeSet } from '../src/theme'
import { WatchNotifier } from '../src/watcher'

const puppeteerTimeoutMs = 15000
const puppeteerTimeoutMs = 60000

jest.mock('fs')

Expand Down
2 changes: 1 addition & 1 deletion test/marp-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ describe('Marp CLI', () => {
it('does not open PPTX in preview window', async () => {
await runForObservation([onePath, '-p', '--pptx', '--no-output'])
expect(Preview.prototype.open).not.toHaveBeenCalled()
}, 30000)
}, 60000)
})

describe('when CLI is running in an official Docker image', () => {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5220,9 +5220,9 @@ minimist-options@4.1.0:
kind-of "^6.0.3"

minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
version "1.2.6"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==

mj-context-menu@^0.6.1:
version "0.6.1"
Expand Down