Skip to content

Commit

Permalink
Migrage travis to github actions (#637)
Browse files Browse the repository at this point in the history
* move travis to github actions
* convert to github actions
* workaround timezone in tests
* drop support for node v4 for now
node_modules/jsdom/node_modules/tough-cookie/node_modules/punycode/punycode.js:133
const ucs2encode = codePoints => String.fromCodePoint(...codePoints);
  • Loading branch information
cesine authored Nov 19, 2024
1 parent 70ecc68 commit 5043a87
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 17 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Node.js CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 22.x]

env:
FAIL_IF_DIST_MESSAGE: "These files are autogenerated. Please don't include changes to these files in your PR"
# Set the timezone to Eastern Standard Time since that is what the library expects
TZ: "America/New_York"

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Run tests
run: npm run coverage

- name: Run Coveralls
run: npm run coveralls

- name: Check for changed dist files
run: |
git fetch origin main --depth=1
# Check for changes in dist files, using grep's exit status directly
DIST_CHANGED=$(git diff --name-only HEAD origin/main | grep 'rickshaw\(\.min\)\?\.\(js\|css\)' || true)
if [ -n "$DIST_CHANGED" ]; then
echo -e "\033[31m${{ env.FAIL_IF_DIST_MESSAGE }}"
echo -e "\033[31mChanged files:"
echo "$DIST_CHANGED"
exit 1
fi
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

0 comments on commit 5043a87

Please sign in to comment.