diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 9d5095e..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (C) 2018-present Arctic Ice Studio -# Copyright (C) 2018-present Sven Greb - -# Project: Styleguide JavaScript -# Repository: https://github.com/arcticicestudio/styleguide-javascript -# License: MIT -# References: -# https://circleci.com/docs/2.0 -# https://circleci.com/docs/2.0/circleci-images/#nodejs - -version: 2 -jobs: - build: - docker: - - image: circleci/node:latest - steps: - - checkout - - run: - name: preprocess-clean-node-modules - command: rm -rf node_modules - - run: - name: preprocess-yarn-install - command: yarn install - - run: - name: lint - command: yarn lint - - run: - name: generate-docs - command: yarn docs:build - - store_artifacts: - path: build/docs diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..0e2d9ff --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,61 @@ +# Copyright (C) 2018-present Arctic Ice Studio +# Copyright (C) 2018-present Sven Greb +# +# Project: Styleguide JavaScript +# Repository: https://github.com/arcticicestudio/styleguide-javascript +# License: MIT +# References: +# https://github.com/features/actions +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +name: Continuous Integration +on: [push] + +jobs: + build-docs: + runs-on: ubuntu-latest + needs: [lint] + steps: + - name: Print metadata and context information + env: + STYLEGUIDE_JAVASCRIPT_GITHUB_ACTION_CONTEXT_RUNNER: ${{ toJson(runner) }} + run: | + echo "Git SHA: $GITHUB_SHA" + echo "Git Ref: $GITHUB_REF" + echo "Workflow Actor: $GITHUB_ACTOR" + echo "GitHub Action Runner: $STYLEGUIDE_JAVASCRIPT_GITHUB_ACTION_CONTEXT_RUNNER" + - name: Checkout repository + uses: actions/checkout@master + - name: Setup Node.js version 12.x + uses: actions/setup-node@master + with: + node-version: 12.x + - name: Install Node modules + run: yarn --frozen-lockfile + - name: Build documentations + run: yarn docs:build + + lint: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [8.x, 10.x, 11.x, 12.x] + steps: + - name: Print metadata and context information + env: + STYLEGUIDE_JAVASCRIPT_GITHUB_ACTION_CONTEXT_RUNNER: ${{ toJson(runner) }} + run: | + echo "Git SHA: $GITHUB_SHA" + echo "Git Ref: $GITHUB_REF" + echo "Workflow Actor: $GITHUB_ACTOR" + echo "GitHub Action Runner: $STYLEGUIDE_JAVASCRIPT_GITHUB_ACTION_CONTEXT_RUNNER" + - name: Checkout repository + uses: actions/checkout@master + - name: "Setup Node.js version ${{ matrix.node-version }}" + uses: actions/setup-node@master + with: + node-version: ${{ matrix.node-version }} + - name: Install Node modules + run: yarn --frozen-lockfile + - name: Run linter + run: yarn lint diff --git a/README.md b/README.md index 0fb4825..109469e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@

-

+

Continuous Integration Status

Every major open source project has its own style guide, a set of standards and conventions for the writing and design of code, documentations and assets. It is much easier to understand a large codebase when all the code in it is in a consistent style. diff --git a/package.json b/package.json index e425439..d40a653 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "lint": "npm-run-all lint:*", "lint:js": "eslint --ext .js .", "lint:md": "remark --no-stdout . \".github/**/*.md\"", + "lint:pretty": "prettier --check \"**/*.{js,json,md,yml}\"", "test": "yarn workspaces run test" }, "devDependencies": { diff --git a/packages/@arcticicestudio/eslint-config-base/README.md b/packages/@arcticicestudio/eslint-config-base/README.md index 5edae29..5204e76 100644 --- a/packages/@arcticicestudio/eslint-config-base/README.md +++ b/packages/@arcticicestudio/eslint-config-base/README.md @@ -6,7 +6,7 @@

-

+

Continuous Integration Status

This project implements the base rules of the [“Arctic Ice Studio JavaScript Style Guide”][gh-stg-repo] as an extensible shared [ESLint][] configuration. diff --git a/packages/@arcticicestudio/eslint-config-typescript/README.md b/packages/@arcticicestudio/eslint-config-typescript/README.md index 3e4b927..3672301 100644 --- a/packages/@arcticicestudio/eslint-config-typescript/README.md +++ b/packages/@arcticicestudio/eslint-config-typescript/README.md @@ -6,7 +6,7 @@

-

+

Continuous Integration Status

This project implements the rules of the [“Arctic Ice Studio JavaScript Style Guide”][gh-stg-repo] as an extensible shared [ESLint][] configuration including plugin support for [TypeScript][typescript] through the official [„TypeScript ESLint“][gh-esl-ts] project as well as compatibility integrations for other projects like [Prettier][]. diff --git a/packages/@arcticicestudio/eslint-config/README.md b/packages/@arcticicestudio/eslint-config/README.md index 0d8af4f..a60a4f3 100644 --- a/packages/@arcticicestudio/eslint-config/README.md +++ b/packages/@arcticicestudio/eslint-config/README.md @@ -6,7 +6,7 @@

-

+

Continuous Integration Status

This project implements the rules of the [“Arctic Ice Studio JavaScript Style Guide”][gh-stg-repo] as an extensible shared [ESLint][] configuration including plugin support for [React][gh-esl-p-react] with [Hooks][gh-esl-p-react-hooks], [JSX A11Y][gh-esl-p-jsx-a11y] as well as compatibility integrations for other projects like [Prettier][].