Code Monkey home page Code Monkey logo

ghatemplates's Introduction

Templates for ghat

My personal GitHub Actions workflow templates for ghat

Example Usage

Initial setup

npx ghat voxpelli/ghatemplates/lint
npx ghat voxpelli/ghatemplates/nodejs --set jobs.test.strategy.matrix.node_version=\[12,14,16\]

Other useful:

npx ghat voxpelli/ghatemplates/exit-silently-on-unsupported

Update to latest version

npx ghat

Or preferably document your use of ghat, and which version, by adding it as a dev dependency, then also add a dedicated npm script to indicate how to use it:

npm install --dev ghat

In "scripts" in package.json:

"sync-gh-actions": "ghat",

Then sync using:

npm run sync-gh-actions

Available actions

Static code analysis

  • lint/lint.ymluses npm – installs npm dependencies and then runs the check npm script, which is expected to be available. Has a basic matrix set, testing on a single Node.js version on a single OS, but can be overridden.

Node.js CI

  • nodejs/nodejs.ymluses npm – basic one which installs npm dependencies and then runs the test-ci npm script across a matrix composed of Linux + Windows and a couple of relevant Node.js versions. The matrix is expected to be overridden with use specific settings.
  • nodejs-pg/nodejs.ymluses npm – similar to nodejs/nodejs.yml, but also sets up a Postgres database and sets a DATABASE_URL with a connection URI as eg. the port may differ and thus can't be hard coded but also since the username and password in CI is probably different from what one uses eg. locally. By default has a more limited test matrix than nodejs/nodejs.yml as it has an extra dimension which could mean a large amount of combinations.
  • nodejs-coveralls/nodejs.ymluses npm – similar to nodejs/nodejs.yml, but uploads test coverage data to Coveralls

Automatic Publishing

  • gh-publish/gh-publish.ymluses npm – contains two steps: First step installs npm dependencies, runs the build npm script if available and finally runs the test npm script. Second step publishes the module to GitHub Package Registry.

Basic ones

  • npm-test/npm-test.ymluses npm – installs npm dependencies and then runs the build npm script if available and then the test npm script. Has a basic matrix set, testing on a single Node.js version on a single OS, but can be overridden.

ghatemplates's People

Contributors

dependabot[bot] avatar voxpelli avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ghatemplates's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.