Skip to content

Commit

Permalink
remove circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
xfrr committed Sep 29, 2023
1 parent ec40467 commit 456186f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Go
name: Build & Test
on:
push:
branches: [main]
branches: [master]
pull_request:
branches: [main]
branches: [master]

jobs:
build:
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ coverage.out
.vscode
.idea

# test results
test_results
# Test results
*/test_results/*
!*.gitkeep
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Goffmpeg
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/93e018e5008b4439acbb30d715b22e7f)](https://www.codacy.com/app/francisco.romero/goffmpeg?utm_source=github.com&utm_medium=referral&utm_content=xfrr/goffmpeg&utm_campaign=Badge_Grade)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/xfrr/goffmpeg/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/xfrr/goffmpeg/tree/master)
[![Go Report Card](https://goreportcard.com/badge/github.com/xfrr/goffmpeg)](https://goreportcard.com/report/github.com/xfrr/goffmpeg)
[![GoDoc](https://godoc.org/github.com/xfrr/goffmpeg?status.svg)](https://godoc.org/github.com/xfrr/goffmpeg)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)

FFMPEG wrapper written in GO

Expand Down
Empty file added e2e/test_results/.gitkeep
Empty file.
41 changes: 0 additions & 41 deletions e2e/transcoding_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package test

import (
"io/ioutil"
"os/exec"
"path"
"sync"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -53,45 +51,6 @@ func TestTranscodingProgress(t *testing.T) {
checkFileExists(t, outputPath)
}

func TestTranscodePipes(t *testing.T) {
createResultsDir(t)

c1 := exec.Command("cat", input3gp)

trans := new(transcoder.Transcoder)

err := trans.InitializeEmptyTranscoder()
assert.Nil(t, err)

w, err := trans.CreateInputPipe()
assert.Nil(t, err)
c1.Stdout = w

r, err := trans.CreateOutputPipe("mp4")
assert.Nil(t, err)

wg := &sync.WaitGroup{}
wg.Add(1)
go func() {
_, err := ioutil.ReadAll(r)
assert.Nil(t, err)

r.Close()
wg.Done()
}()

go func() {
err := c1.Run()
assert.Nil(t, err)
w.Close()
}()
done := trans.Run(false)
err = <-done
assert.Nil(t, err)

wg.Wait()
}

func createResultsDir(t *testing.T) {
err := exec.Command("mkdir", "-p", resultsPath).Run()
assert.Nil(t, err)
Expand Down
Empty file added examples/test_results/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions transcoder/transcoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@ func (t *Transcoder) Run(progress bool) <-chan error {
}

err = proc.Wait()

go t.closePipes()

if err != nil {
err = fmt.Errorf("failed finish ffmpeg (%s) with %s message %s %s", command, err, outb.String(), errb.String())
}

go t.closePipes()

done <- err
close(done)
}(err)
Expand Down

0 comments on commit 456186f

Please sign in to comment.