Skip to content

Commit

Permalink
chore: switch to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Aug 19, 2022
1 parent dd9e31d commit b20fd55
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 714 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
pull_request:
types: [opened, synchronize]
push:
branches: [main]

concurrency:
group: "${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Use node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Format Code
run: npm run format
- name: Lint Code
run: npm run lint
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci] format"
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ${{ matrix.os }}
name: "test: node@${{ matrix.node }} (${{ matrix.os }})"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [14, 16, 18]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run ci:test
- name: Report code coverage
uses: codecov/codecov-action@v2

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg" alt="Styled with prettier"/>
</a>
<!-- CI -->
<a href="https://travis-ci.org/eBay/visual-html">
<img src="https://img.shields.io/travis/eBay/visual-html.svg" alt="Build status"/>
<a href="https://github.com/ebay/visual-html/actions/workflows/ci.yml">
<img src="https://github.com/ebay/visual-html/actions/workflows/ci.yml/badge.svg" alt="Build status"/>
</a>
<!-- Coverage -->
<a href="https://coveralls.io/github/eBay/visual-html">
<img src="https://img.shields.io/coveralls/eBay/visual-html.svg" alt="Test Coverage"/>
<a href="https://codecov.io/gh/ebay/visual-html">
<img src="https://codecov.io/gh/ebay/visual-html/branch/main/graph/badge.svg?token=Sv8ePs16ix" alt="Code Coverage"/>
</a>
<!-- NPM Version -->
<a href="https://npmjs.org/package/visual-html">
Expand Down
Loading

0 comments on commit b20fd55

Please sign in to comment.