mirror of https://github.com/aminya/setup-cpp
chore: fix the formatting and spelling tests
This commit is contained in:
parent
aecb4b3e29
commit
895aacad8c
|
@ -10,6 +10,4 @@ Before running the tests locally, backup your environment variables because faul
|
||||||
|
|
||||||
<https://stackoverflow.com/a/5147185/7910299>
|
<https://stackoverflow.com/a/5147185/7910299>
|
||||||
|
|
||||||
|
|
||||||
Install [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) for docker testing.
|
Install [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) for docker testing.
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ words:
|
||||||
- msys
|
- msys
|
||||||
- multilib
|
- multilib
|
||||||
- mxschmitt
|
- mxschmitt
|
||||||
|
- noconfirm
|
||||||
|
- noprogressbar
|
||||||
- nothrow
|
- nothrow
|
||||||
- npmrc
|
- npmrc
|
||||||
- Opencppcoverage
|
- Opencppcoverage
|
||||||
|
@ -54,6 +56,7 @@ words:
|
||||||
- pypy
|
- pypy
|
||||||
- setupcpp
|
- setupcpp
|
||||||
- setx
|
- setx
|
||||||
|
- Syuu
|
||||||
- terserrc
|
- terserrc
|
||||||
- tsbuildinfo
|
- tsbuildinfo
|
||||||
- ucrt
|
- ucrt
|
||||||
|
|
|
@ -38,8 +38,7 @@ commandTests:
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*Cppcheck.*"]
|
expectedOutput: [".*Cppcheck.*"]
|
||||||
|
|
||||||
|
|
||||||
fileExistenceTests:
|
fileExistenceTests:
|
||||||
- name: 'vcpkg'
|
- name: "vcpkg"
|
||||||
path: '/root/vcpkg'
|
path: "/root/vcpkg"
|
||||||
shouldExist: true
|
shouldExist: true
|
||||||
|
|
|
@ -38,11 +38,10 @@ commandTests:
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*clang.*"]
|
expectedOutput: [".*clang.*"]
|
||||||
|
|
||||||
|
|
||||||
fileExistenceTests:
|
fileExistenceTests:
|
||||||
- name: 'vcpkg'
|
- name: "vcpkg"
|
||||||
path: '/root/vcpkg'
|
path: "/root/vcpkg"
|
||||||
shouldExist: true
|
shouldExist: true
|
||||||
- name: 'llvm'
|
- name: "llvm"
|
||||||
path: '/root/llvm'
|
path: "/root/llvm"
|
||||||
shouldExist: true
|
shouldExist: true
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "shx rm -rf dist/ && shx mkdir ./dist && run-p test.tsc build.parcel copy.matchers",
|
"build": "shx rm -rf dist/ && shx mkdir ./dist && run-p test.tsc build.parcel copy.matchers",
|
||||||
"build.docker": "pnpm build && docker build -f ./dev/docker/ubuntu_node.dockerfile -t setup_cpp .",
|
"build.docker": "pnpm build && docker build -f ./dev/docker/ubuntu_node.dockerfile -t setup_cpp .",
|
||||||
"build.docker.ubuntu": "pnpm build && docker build -f ./dev/docker/ubuntu_node.dockerfile -t setup_cpp:ubuntu .",
|
|
||||||
"build.docker.arch": "pnpm build && docker build -f ./dev/docker/arch_node.dockerfile -t setup_cpp:arch .",
|
"build.docker.arch": "pnpm build && docker build -f ./dev/docker/arch_node.dockerfile -t setup_cpp:arch .",
|
||||||
|
"build.docker.ubuntu": "pnpm build && docker build -f ./dev/docker/ubuntu_node.dockerfile -t setup_cpp:ubuntu .",
|
||||||
"build.parcel": "cross-env NODE_ENV=production parcel build --detailed-report",
|
"build.parcel": "cross-env NODE_ENV=production parcel build --detailed-report",
|
||||||
"bump": "ncu -u -x execa,numerous && pnpm update",
|
"bump": "ncu -u -x execa,numerous && pnpm update",
|
||||||
"clean": "shx rm -rf .parcel-cache dist exe",
|
"clean": "shx rm -rf .parcel-cache dist exe",
|
||||||
|
@ -26,12 +26,12 @@
|
||||||
"pack.exe": "shx rm -rf ./dist/tsconfig.tsbuildinfo && node ./dev/scripts/pack-exe.js",
|
"pack.exe": "shx rm -rf ./dist/tsconfig.tsbuildinfo && node ./dev/scripts/pack-exe.js",
|
||||||
"prepare": "npm run build",
|
"prepare": "npm run build",
|
||||||
"start.docker": "docker run -t setup_cpp .",
|
"start.docker": "docker run -t setup_cpp .",
|
||||||
"start.docker.ubuntu": "docker run -t setup_cpp:ubuntu .",
|
|
||||||
"start.docker.arch": "docker run -t setup_cpp:arch .",
|
"start.docker.arch": "docker run -t setup_cpp:arch .",
|
||||||
"test.docker.ubuntu": "docker build -f ./dev/docker/ubuntu_node.dockerfile --target base -t setup_cpp:ubuntu-base . && container-structure-test test --image setup_cpp:ubuntu-base --config ./dev/container-tests/ubuntu.yml",
|
"start.docker.ubuntu": "docker run -t setup_cpp:ubuntu .",
|
||||||
"test.docker.arch": "docker build -f ./dev/docker/arch_node.dockerfile --target base -t setup_cpp:arch-base . && container-structure-test test --image setup_cpp:arch-base --config ./dev/container-tests/arch.yml",
|
|
||||||
"test": "run-p test.format test.lint test.cspell test.tsc test.unit",
|
"test": "run-p test.format test.lint test.cspell test.tsc test.unit",
|
||||||
"test.cspell": "cspell lint --no-progress --show-suggestions",
|
"test.cspell": "cspell lint --no-progress --show-suggestions",
|
||||||
|
"test.docker.arch": "docker build -f ./dev/docker/arch_node.dockerfile --target base -t setup_cpp:arch-base . && container-structure-test test --image setup_cpp:arch-base --config ./dev/container-tests/arch.yml",
|
||||||
|
"test.docker.ubuntu": "docker build -f ./dev/docker/ubuntu_node.dockerfile --target base -t setup_cpp:ubuntu-base . && container-structure-test test --image setup_cpp:ubuntu-base --config ./dev/container-tests/ubuntu.yml",
|
||||||
"test.format": "prettier . --check",
|
"test.format": "prettier . --check",
|
||||||
"test.lint": "eslint .",
|
"test.lint": "eslint .",
|
||||||
"test.tsc": "tsc --noEmit | loose-ts-check",
|
"test.tsc": "tsc --noEmit | loose-ts-check",
|
||||||
|
|
|
@ -10,11 +10,7 @@ let didUpdate: boolean = false
|
||||||
let didInit: boolean = false
|
let didInit: boolean = false
|
||||||
|
|
||||||
/** A function that installs a package using pacman */
|
/** A function that installs a package using pacman */
|
||||||
export function setupPacmanPack(
|
export function setupPacmanPack(name: string, version?: string, aur?: string): InstallationInfo {
|
||||||
name: string,
|
|
||||||
version?: string,
|
|
||||||
aur?: string,
|
|
||||||
): InstallationInfo {
|
|
||||||
info(`Installing ${name} ${version ?? ""} via pacman`)
|
info(`Installing ${name} ${version ?? ""} via pacman`)
|
||||||
|
|
||||||
const pacman = "pacman"
|
const pacman = "pacman"
|
||||||
|
@ -29,11 +25,7 @@ export function setupPacmanPack(
|
||||||
// set time - zone
|
// set time - zone
|
||||||
// TZ = Canada / Pacific
|
// TZ = Canada / Pacific
|
||||||
// ln - snf / usr / share / zoneinfo / $TZ / etc / localtime && echo $TZ > /etc/timezone
|
// ln - snf / usr / share / zoneinfo / $TZ / etc / localtime && echo $TZ > /etc/timezone
|
||||||
execSudo(pacman, [
|
execSudo(pacman, ["-Sy", "--noconfirm", "base-devel"])
|
||||||
"-Sy",
|
|
||||||
"--noconfirm",
|
|
||||||
"base-devel",
|
|
||||||
])
|
|
||||||
didInit = true
|
didInit = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue