Drop disappeared wei/curl@v1
(#1864)
* chore: trigger actions * fix: use curl command directly * fix: use node:16-buster * fix: remove --fail-with-body * chore: format codes
This commit is contained in:
parent
b92d95f899
commit
24348ff1ee
2 changed files with 11 additions and 12 deletions
|
@ -14,10 +14,11 @@ import (
|
||||||
"testing/fstest"
|
"testing/fstest"
|
||||||
|
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
"github.com/nektos/act/pkg/model"
|
|
||||||
"github.com/nektos/act/pkg/runner"
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
|
"github.com/nektos/act/pkg/model"
|
||||||
|
"github.com/nektos/act/pkg/runner"
|
||||||
)
|
)
|
||||||
|
|
||||||
type writableMapFile struct {
|
type writableMapFile struct {
|
||||||
|
@ -238,9 +239,11 @@ type TestJobFileInfo struct {
|
||||||
containerArchitecture string
|
containerArchitecture string
|
||||||
}
|
}
|
||||||
|
|
||||||
var artifactsPath = path.Join(os.TempDir(), "test-artifacts")
|
var (
|
||||||
var artifactsAddr = "127.0.0.1"
|
artifactsPath = path.Join(os.TempDir(), "test-artifacts")
|
||||||
var artifactsPort = "12345"
|
artifactsAddr = "127.0.0.1"
|
||||||
|
artifactsPort = "12345"
|
||||||
|
)
|
||||||
|
|
||||||
func TestArtifactFlow(t *testing.T) {
|
func TestArtifactFlow(t *testing.T) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
|
@ -253,7 +256,7 @@ func TestArtifactFlow(t *testing.T) {
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
platforms := map[string]string{
|
platforms := map[string]string{
|
||||||
"ubuntu-latest": "node:16-buster-slim",
|
"ubuntu-latest": "node:16-buster", // Don't use node:16-buster-slim because it doesn't have curl command, which is used in the tests
|
||||||
}
|
}
|
||||||
|
|
||||||
tables := []TestJobFileInfo{
|
tables := []TestJobFileInfo{
|
||||||
|
|
|
@ -8,9 +8,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- run: echo "hello world" > test.txt
|
- run: echo "hello world" > test.txt
|
||||||
- name: curl upload
|
- name: curl upload
|
||||||
uses: wei/curl@v1
|
run: curl --silent --show-error --fail ${ACTIONS_RUNTIME_URL}upload/1?itemPath=../../my-artifact/secret.txt --upload-file test.txt
|
||||||
with:
|
|
||||||
args: -s --fail ${ACTIONS_RUNTIME_URL}upload/1?itemPath=../../my-artifact/secret.txt --upload-file test.txt
|
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: my-artifact
|
name: my-artifact
|
||||||
|
@ -27,9 +25,7 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Verify download should work by clean extra dots
|
- name: Verify download should work by clean extra dots
|
||||||
uses: wei/curl@v1
|
run: curl --silent --show-error --fail --path-as-is -o out.txt ${ACTIONS_RUNTIME_URL}artifact/1/../../../1/my-artifact/secret.txt
|
||||||
with:
|
|
||||||
args: --path-as-is -s -o out.txt --fail ${ACTIONS_RUNTIME_URL}artifact/1/../../../1/my-artifact/secret.txt
|
|
||||||
- name: 'Verify download content'
|
- name: 'Verify download content'
|
||||||
run: |
|
run: |
|
||||||
file="out.txt"
|
file="out.txt"
|
||||||
|
|
Loading…
Reference in a new issue