mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update update-api.js
This commit is contained in:
parent
9e45139883
commit
3b4db94206
3 changed files with 16 additions and 11 deletions
12
.github/workflows/auto-update.yml
vendored
12
.github/workflows/auto-update.yml
vendored
|
@ -86,8 +86,16 @@ jobs:
|
|||
path: scripts/logs
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: gh-pages
|
||||
path: .gh-pages
|
||||
name: channels.json
|
||||
path: .gh-pages/api/channels.json
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: programs.json
|
||||
path: .gh-pages/api/programs.json
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: guides
|
||||
path: .gh-pages/guides
|
||||
- run: node scripts/commands/update-readme.js
|
||||
- run: git add README.md
|
||||
- run: git commit -m "[Bot] Update README.md"
|
||||
|
|
|
@ -6,10 +6,7 @@ const API_DIR = process.env.API_DIR || '.gh-pages/api'
|
|||
|
||||
async function main() {
|
||||
await generateChannelsJson()
|
||||
|
||||
// Reason: File api/programs.json is 419.08 MB; this exceeds GitHub's file size limit of 100.00 MB
|
||||
// await generateProgramsJson()
|
||||
|
||||
await generateProgramsJson()
|
||||
logger.info(`Done`)
|
||||
}
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ it('can generate channels.json', () => {
|
|||
expect(output).toBe(expected)
|
||||
})
|
||||
|
||||
// it('can generate programs.json', () => {
|
||||
// const output = content('tests/__data__/output/api/programs.json')
|
||||
// const expected = content('tests/__data__/expected/api/programs.json')
|
||||
it('can generate programs.json', () => {
|
||||
const output = content('tests/__data__/output/api/programs.json')
|
||||
const expected = content('tests/__data__/expected/api/programs.json')
|
||||
|
||||
// expect(output).toBe(expected)
|
||||
// })
|
||||
expect(output).toBe(expected)
|
||||
})
|
||||
|
||||
function content(filepath) {
|
||||
const data = fs.readFileSync(path.resolve(filepath), {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue