Skip to content

Commit

Permalink
replace travis with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zfletch committed Jul 31, 2020
1 parent 7f664aa commit 41dd53c
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 14 deletions.
File renamed without changes.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: deploy

on:
push:
branches: [master]

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2-beta
with:
node-version: '14'

- name: Install dependencies
run: yarn install

- name: Run tests
run: yarn test --coverage
env:
CI: true

- name: Build GitHub
run: yarn build

- name: Deploy GitHub
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: gh-pages
FOLDER: build

- name: Build Perseids
run: yarn build
env:
PUBLIC_URL: /lsj

- name: Deploy Perseids
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ github.token }}
BRANCH: perseids-build
FOLDER: build
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2-beta
with:
node-version: '14'

- name: Install dependencies
run: yarn install

- name: Lint code
run: yarn lint

# Ideally yarn audit would be part of the CI flow
# but currently there is too much noise
# See e.g. https://github.com/facebook/create-react-app/issues/8529
# - name: Audit dependencies
# - run: yarn audit

- name: Run tests
run: yarn test --coverage
env:
CI: true

- name: Build
run: yarn build
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"cleanup": "rm -rf node_modules/gh-pages/.cache",
"build-dictionary": "node ./scripts/build-dictionary.js",
"start": "react-app-rewired start",
"build": "react-app-rewired --max_old_space_size=4096 build && cp build/index.html build/404.html",
"build": "react-app-rewired --max-old-space-size=8192 build && cp build/index.html build/404.html",
"lint": "eslint --ext=js --ext=jsx .",
"test": "react-app-rewired test --env=jsdom",
"eject": "react-app-rewired eject"
Expand Down

0 comments on commit 41dd53c

Please sign in to comment.