mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Merge pull request #432 from mchangrh/eslint-and-workflow
eslint + workflow formatting
This commit is contained in:
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -1,9 +1,13 @@
|
|||||||
name: SQLite CI
|
name: SQLite CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
name: Run Tests with SQLite
|
name: Run Tests with SQLite
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@@ -12,7 +16,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|||||||
9
.github/workflows/eslint.yml
vendored
9
.github/workflows/eslint.yml
vendored
@@ -1,9 +1,13 @@
|
|||||||
name: Linting
|
name: Linting
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
lint:
|
||||||
name: Lint with ESLint
|
name: Lint with ESLint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
@@ -12,7 +16,6 @@ jobs:
|
|||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
- run: npm install
|
- run: npm install
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
5
.github/workflows/generate-sqlite-base.yml
vendored
5
.github/workflows/generate-sqlite-base.yml
vendored
@@ -1,12 +1,17 @@
|
|||||||
name: create-sqlite-base
|
name: create-sqlite-base
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
paths:
|
paths:
|
||||||
- databases/**
|
- databases/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
make-base-db:
|
make-base-db:
|
||||||
|
name: Generate SQLite base .db
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v2
|
||||||
|
|||||||
8
.github/workflows/postgres-redis-ci.yml
vendored
8
.github/workflows/postgres-redis-ci.yml
vendored
@@ -1,9 +1,13 @@
|
|||||||
name: PostgreSQL + Redis CI
|
name: PostgreSQL + Redis CI
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
test:
|
||||||
name: Run Tests with PostgreSQL and Redis
|
name: Run Tests with PostgreSQL and Redis
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
12
.github/workflows/take-action.yml
vendored
12
.github/workflows/take-action.yml
vendored
@@ -1,14 +1,12 @@
|
|||||||
# .github/workflows/take.yml
|
|
||||||
name: Assign issue to contributor
|
name: Assign issue to contributor
|
||||||
on:
|
on: [issue_comment]
|
||||||
issue_comment:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
assign:
|
assign:
|
||||||
name: Take an issue
|
name: Take an issue
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: take the issue
|
- name: take the issue
|
||||||
uses: bdougie/take-action@main
|
uses: bdougie/take-action@main
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ github.token }}
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ import { getChapterNames } from "./routes/getChapterNames";
|
|||||||
import { postRating } from "./routes/ratings/postRating";
|
import { postRating } from "./routes/ratings/postRating";
|
||||||
import { getRating } from "./routes/ratings/getRating";
|
import { getRating } from "./routes/ratings/getRating";
|
||||||
import { postClearCache as ratingPostClearCache } from "./routes/ratings/postClearCache";
|
import { postClearCache as ratingPostClearCache } from "./routes/ratings/postClearCache";
|
||||||
import path from "path";
|
|
||||||
|
|
||||||
export function createServer(callback: () => void): Server {
|
export function createServer(callback: () => void): Server {
|
||||||
// Create a service (the app object is just a callback).
|
// Create a service (the app object is just a callback).
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ describe("getRating", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This test will fail if tests are already ran with redis.
|
This test will fail if tests are already ran with redis.
|
||||||
*/
|
*/
|
||||||
it("Should be able to bulk fetch", (done) => {
|
it("Should be able to bulk fetch", (done) => {
|
||||||
getBulkRating([videoOnePartialHash, videoTwoPartialHash])
|
getBulkRating([videoOnePartialHash, videoTwoPartialHash])
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ describe("redis test", function() {
|
|||||||
it("Should not be able to get not stored value", (done) => {
|
it("Should not be able to get not stored value", (done) => {
|
||||||
redis.getAsync(randKey2)
|
redis.getAsync(randKey2)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.reply || res.err ) assert.fail("Value should not be found")
|
if (res.reply || res.err ) assert.fail("Value should not be found");
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user