Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
bugfix + CI
Browse files Browse the repository at this point in the history
- Removed duplicate entry on guessit score
- Added github action CI for tests
  • Loading branch information
Uilton Oliveira committed Apr 26, 2021
1 parent 0530ce8 commit d12c7b1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-20.04

services:
guessit_rest:
image: guessit/guessit-rest:latest
ports:
- 5000:80

strategy:
matrix:
node-version: [14.x, 15.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
1 change: 0 additions & 1 deletion providers/guessit.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ provider.chooseBest = (names = [], filename) => {
score += match(base, el, 'source') ? 2 : 0;
score += match(base, el, 'audio_codec') ? 1 : 0;
score += match(base, el, 'audio_channels') ? 1 : 0;
score += match(base, el, 'audio_codec') ? 1 : 0;
score += match(base, el, 'streaming_service') ? 1 : 0;

scoreResult.push({
Expand Down

0 comments on commit d12c7b1

Please sign in to comment.