Skip to content

Commit e9e1ba5

Browse files
authored
chore: Add test-and-lint github workflow and the corresponding status badge to the Readme
Merged pull request #5 from uploadcare/tests-run-github-workflow
2 parents fcc6422 + aac2ee7 commit e9e1ba5

File tree

3 files changed

+33
-15
lines changed

3 files changed

+33
-15
lines changed

.github/workflows/test-and-lint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test and Lint
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
test_and_lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: 0
14+
ref: main
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: '14'
18+
- run: |
19+
if [ -f "yarn.lock" ]; then
20+
yarn install
21+
else
22+
npm install
23+
fi
24+
- run: |
25+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
26+
git config --global user.name "github-actions[bot]"
27+
- run: yarn test
28+
- run: yarn lint
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uploadcare custom image loader for Next.js
2-
[![Build Status][build-img]][build-link]
2+
![Test Status][test-status-img]
33
[![NPM version][npm-img]][npm-link]
44

55
* [Demo](#demo)
@@ -170,9 +170,7 @@ Next checks whether the image url which loader generates has the exact value whi
170170

171171
**Fix:** Ignore the warning for now.
172172

173-
174-
[build-img]: https://app.travis-ci.com/uploadcare/nextjs-loader.svg?branch=main
175-
[build-link]: https://api.travis-ci.com/uploadcare/nextjs-loader
173+
[test-status-img]: https://github.com/uploadcare/nextjs-loader/actions/workflows/test-and-lint.yml/badge.svg
176174
[npm-img]: https://img.shields.io/npm/v/@uploadcare/nextjs-loader.svg
177175
[npm-link]: https://www.npmjs.com/package/@uploadcare/nextjs-loader
178176
[stackblitz-image]: https://developer.stackblitz.com/img/open_in_stackblitz.svg

0 commit comments

Comments
 (0)