mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-12-04 07:24:45 +01:00
Move test fixtures to parent directory
This commit is contained in:
parent
11f981cea4
commit
2375787b23
13 changed files with 39 additions and 8 deletions
8
.github/workflows/deploy.yml
vendored
8
.github/workflows/deploy.yml
vendored
|
@ -116,7 +116,7 @@ jobs:
|
||||||
- name: Support packageManager variable
|
- name: Support packageManager variable
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
workingDirectory: "./test/fixtures/empty"
|
workingDirectory: "./test/empty"
|
||||||
packageManager: "npm"
|
packageManager: "npm"
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
@ -125,7 +125,7 @@ jobs:
|
||||||
- name: Support npm package manager
|
- name: Support npm package manager
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
workingDirectory: "./test/fixtures/npm"
|
workingDirectory: "./test/npm"
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: deploy --dry-run
|
command: deploy --dry-run
|
||||||
|
@ -133,7 +133,7 @@ jobs:
|
||||||
- name: Support yarn package manager
|
- name: Support yarn package manager
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
workingDirectory: "./test/fixtures/yarn"
|
workingDirectory: "./test/yarn"
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: deploy --dry-run
|
command: deploy --dry-run
|
||||||
|
@ -141,7 +141,7 @@ jobs:
|
||||||
- name: Support pnpm package manager
|
- name: Support pnpm package manager
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
workingDirectory: "./test/fixtures/pnpm"
|
workingDirectory: "./test/pnpm"
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
command: deploy --dry-run
|
command: deploy --dry-run
|
||||||
|
|
|
@ -42,19 +42,19 @@ describe("detectPackageManager", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should return npm if package-lock.json exists", () => {
|
test("should return npm if package-lock.json exists", () => {
|
||||||
expect(detectPackageManager("test/fixtures/npm")).toBe("npm");
|
expect(detectPackageManager("test/npm")).toBe("npm");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should return yarn if yarn.lock exists", () => {
|
test("should return yarn if yarn.lock exists", () => {
|
||||||
expect(detectPackageManager("test/fixtures/yarn")).toBe("yarn");
|
expect(detectPackageManager("test/yarn")).toBe("yarn");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should return pnpm if pnpm-lock.yaml exists", () => {
|
test("should return pnpm if pnpm-lock.yaml exists", () => {
|
||||||
expect(detectPackageManager("test/fixtures/pnpm")).toBe("pnpm");
|
expect(detectPackageManager("test/pnpm")).toBe("pnpm");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should return null if no package manager is detected", () => {
|
test("should return null if no package manager is detected", () => {
|
||||||
expect(detectPackageManager("test/fixtures/empty")).toBe(null);
|
expect(detectPackageManager("test/empty")).toBe(null);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
3
test/empty/package.json
Normal file
3
test/empty/package.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"name": "wrangler-action-detect-package-manager-test"
|
||||||
|
}
|
0
test/fixtures/empty/.gitkeep
vendored
0
test/fixtures/empty/.gitkeep
vendored
0
test/fixtures/npm/package-lock.json
generated
vendored
0
test/fixtures/npm/package-lock.json
generated
vendored
0
test/fixtures/pnpm/pnpm-lock.yaml
vendored
0
test/fixtures/pnpm/pnpm-lock.yaml
vendored
0
test/fixtures/yarn/yarn.lock
vendored
0
test/fixtures/yarn/yarn.lock
vendored
10
test/npm/package-lock.json
generated
Normal file
10
test/npm/package-lock.json
generated
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"name": "wrangler-action-npm-test",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "wrangler-action-npm-test"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
test/npm/package.json
Normal file
3
test/npm/package.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"name": "wrangler-action-npm-test"
|
||||||
|
}
|
3
test/pnpm/package.json
Normal file
3
test/pnpm/package.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"name": "wrangler-action-pnpm-test"
|
||||||
|
}
|
5
test/pnpm/pnpm-lock.yaml
Normal file
5
test/pnpm/pnpm-lock.yaml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
lockfileVersion: '6.0'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
3
test/yarn/package.json
Normal file
3
test/yarn/package.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"name": "wrangler-action-yarn-test"
|
||||||
|
}
|
4
test/yarn/yarn.lock
Normal file
4
test/yarn/yarn.lock
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue