GithubHelp home page GithubHelp logo

waldyrious / atom-ci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alhadis/atom-ci

0.0 2.0 0.0 184 KB

Script for setting up Atom projects on continuous integration servers.

License: ISC License

Makefile 4.88% Shell 82.96% sed 12.16%

atom-ci's Introduction

Atom CI

This is a script for setting up continuous integration with an Atom project.

They're collapsible, baby.

Usage

Add the following line to your project's .travis.yml file:

script: "curl -sL https://git.io/fji1w | sh"

Features

It's fundamentally the same as atom/ci, with the following differences:

  1. GitHub's release pages are consulted directly for downloads.
    This is a tad bit slower than downloading from atom.io, but it means sudden changes to their infrastructure won't break your build.

  2. Arbitrary release channels (dev, nightly) are unsupported.
    Only stable and beta releases of Atom can be tested against. However, users can set $ATOM_RELEASE in their environment to build against an arbitrary Atom version:

    env:
      - ATOM_CHANNEL=stable   # Latest stable release (default)
      - ATOM_RELEASE=v1.34.0  # Override ATOM_CHANNEL and test specific version
  3. Only TravisCI is supported for now.

  4. lint or test scripts defined in package.json are used, if possible.
    If your package manifest defines a lint or test script, the CI script will call those instead. For example:

    {
    	"scripts": {
    		"lint": "npx eslint --ext mjs,js ./lib/ ./tools",
    		"test": "atom -t ./specs"
    	}
    }

    If you don't specify a script, the usual defaults assumed by atom/ci are attempted instead:

    # Linting
    DIRS="./lib ./src ./spec ./test"
    npx coffeelint $DIRS
    npx eslint $DIRS
    npx tslint $DIRS
    
    # Testing
    DIRS="./spec ./specs ./test ./tests"
    atom --test $DIRS

    Note that only linters listed in devDependencies will be run, and missing directories will be skipped. However, at least one test directory must be included, or else the build will fail.

Testing on Ubuntu

If you're running builds on Ubuntu, be forewarned that Atom's beta channel may give dpkg an archive it can't unpack due to a bug with older versions of dpkg. The solution is to run builds on Xenial instead of Trusty, which requires that you include libgconf2-4 as a dependency:

@@ .travis.yml @@
 addons:
   apt:
     packages:
     - build-essential
     - fakeroot
     - git
+    - libgconf2-4
     - libsecret-1-dev

To-do list

  • Support the atom-mocha executable, once it can be run globally

  • Learn PowerShell and write a version of this for AppVeyor
    Not a huge priority at the moment, as the AppVeyor integration provided by atom/ci is currently working fine.

Background

On July 6th 2019 AEST, Atom's CI script suddenly broke. The culprit was botched handling of a curl(1) request which included an Accept header:

$ curl -L "https://atom.io/download/mac?channel=${ATOM_CHANNEL}" \
	-H 'Accept: application/octet-stream' \
	-o "atom.zip"
######################################################################## 100.0%
curl: (22) The requested URL returned error: 406 Not Acceptable

Following the URL simply lead to Atom's releases page on GitHub. I was unsure what the link usually pointed to, but having this break the builds of each of my projects was certainly not the intended outcome.

Since I'm blocked from the @atom org on GitHub, I was unable to report this or submit a pull-request. So, as usual, I took things into my own hands.

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.