summaryrefslogtreecommitdiffstats
path: root/pkg/artifacts
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-06-13 23:24:31 +0200
committerGitHub <noreply@github.com>2023-06-13 23:24:31 +0200
commit24348ff1eec2ba2bec4a29fd4d544cb1788c9a1e (patch)
tree04c29113c2eef2f777cff2fe2745fb97994eb8d6 /pkg/artifacts
parentbuild(deps): bump github.com/moby/buildkit from 0.11.5 to 0.11.6 (#1858) (diff)
downloadforgejo-act-24348ff1eec2ba2bec4a29fd4d544cb1788c9a1e.tar.xz
forgejo-act-24348ff1eec2ba2bec4a29fd4d544cb1788c9a1e.zip
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
Diffstat (limited to 'pkg/artifacts')
-rw-r--r--pkg/artifacts/server_test.go15
-rw-r--r--pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml8
2 files changed, 11 insertions, 12 deletions
diff --git a/pkg/artifacts/server_test.go b/pkg/artifacts/server_test.go
index 943820c..aeeb059 100644
--- a/pkg/artifacts/server_test.go
+++ b/pkg/artifacts/server_test.go
@@ -14,10 +14,11 @@ import (
"testing/fstest"
"github.com/julienschmidt/httprouter"
- "github.com/nektos/act/pkg/model"
- "github.com/nektos/act/pkg/runner"
log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
+
+ "github.com/nektos/act/pkg/model"
+ "github.com/nektos/act/pkg/runner"
)
type writableMapFile struct {
@@ -238,9 +239,11 @@ type TestJobFileInfo struct {
containerArchitecture string
}
-var artifactsPath = path.Join(os.TempDir(), "test-artifacts")
-var artifactsAddr = "127.0.0.1"
-var artifactsPort = "12345"
+var (
+ artifactsPath = path.Join(os.TempDir(), "test-artifacts")
+ artifactsAddr = "127.0.0.1"
+ artifactsPort = "12345"
+)
func TestArtifactFlow(t *testing.T) {
if testing.Short() {
@@ -253,7 +256,7 @@ func TestArtifactFlow(t *testing.T) {
defer cancel()
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{
diff --git a/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml b/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml
index e717f14..ec801c3 100644
--- a/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml
+++ b/pkg/artifacts/testdata/GHSL-2023-004/artifacts.yml
@@ -8,9 +8,7 @@ jobs:
steps:
- run: echo "hello world" > test.txt
- name: curl upload
- uses: wei/curl@v1
- with:
- args: -s --fail ${ACTIONS_RUNTIME_URL}upload/1?itemPath=../../my-artifact/secret.txt --upload-file test.txt
+ run: curl --silent --show-error --fail ${ACTIONS_RUNTIME_URL}upload/1?itemPath=../../my-artifact/secret.txt --upload-file test.txt
- uses: actions/download-artifact@v2
with:
name: my-artifact
@@ -27,9 +25,7 @@ jobs:
exit 1
fi
- name: Verify download should work by clean extra dots
- uses: wei/curl@v1
- with:
- args: --path-as-is -s -o out.txt --fail ${ACTIONS_RUNTIME_URL}artifact/1/../../../1/my-artifact/secret.txt
+ run: curl --silent --show-error --fail --path-as-is -o out.txt ${ACTIONS_RUNTIME_URL}artifact/1/../../../1/my-artifact/secret.txt
- name: 'Verify download content'
run: |
file="out.txt"