chore: fix the formatting and spelling tests

This commit is contained in:
Amin Yahyaabadi 2022-06-29 18:58:13 -07:00
parent aecb4b3e29
commit 895aacad8c
6 changed files with 90 additions and 99 deletions

View File

@ -10,6 +10,4 @@ Before running the tests locally, backup your environment variables because faul
<https://stackoverflow.com/a/5147185/7910299>
Install [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) for docker testing.

View File

@ -45,6 +45,8 @@ words:
- msys
- multilib
- mxschmitt
- noconfirm
- noprogressbar
- nothrow
- npmrc
- Opencppcoverage
@ -54,6 +56,7 @@ words:
- pypy
- setupcpp
- setx
- Syuu
- terserrc
- tsbuildinfo
- ucrt

View File

@ -38,8 +38,7 @@ commandTests:
args: ["--version"]
expectedOutput: [".*Cppcheck.*"]
fileExistenceTests:
- name: 'vcpkg'
path: '/root/vcpkg'
- name: "vcpkg"
path: "/root/vcpkg"
shouldExist: true

View File

@ -38,11 +38,10 @@ commandTests:
args: ["--version"]
expectedOutput: [".*clang.*"]
fileExistenceTests:
- name: 'vcpkg'
path: '/root/vcpkg'
- name: "vcpkg"
path: "/root/vcpkg"
shouldExist: true
- name: 'llvm'
path: '/root/llvm'
- name: "llvm"
path: "/root/llvm"
shouldExist: true

View File

@ -14,8 +14,8 @@
"scripts": {
"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.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.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",
"bump": "ncu -u -x execa,numerous && pnpm update",
"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",
"prepare": "npm run build",
"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 .",
"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.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",
"start.docker.ubuntu": "docker run -t setup_cpp:ubuntu .",
"test": "run-p test.format test.lint test.cspell test.tsc test.unit",
"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.lint": "eslint .",
"test.tsc": "tsc --noEmit | loose-ts-check",

View File

@ -10,11 +10,7 @@ let didUpdate: boolean = false
let didInit: boolean = false
/** A function that installs a package using pacman */
export function setupPacmanPack(
name: string,
version?: string,
aur?: string,
): InstallationInfo {
export function setupPacmanPack(name: string, version?: string, aur?: string): InstallationInfo {
info(`Installing ${name} ${version ?? ""} via pacman`)
const pacman = "pacman"
@ -29,11 +25,7 @@ export function setupPacmanPack(
// set time - zone
// TZ = Canada / Pacific
// ln - snf / usr / share / zoneinfo / $TZ / etc / localtime && echo $TZ > /etc/timezone
execSudo(pacman, [
"-Sy",
"--noconfirm",
"base-devel",
])
execSudo(pacman, ["-Sy", "--noconfirm", "base-devel"])
didInit = true
}