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
|
||||||
|
|
|
@ -1,45 +1,44 @@
|
||||||
schemaVersion: 2.0.0
|
schemaVersion: 2.0.0
|
||||||
|
|
||||||
commandTests:
|
commandTests:
|
||||||
- name: gcc compiler
|
- name: gcc compiler
|
||||||
command: gcc
|
command: gcc
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*gcc.*GCC.*"]
|
expectedOutput: [".*gcc.*GCC.*"]
|
||||||
- name: g++ compiler
|
- name: g++ compiler
|
||||||
command: g++
|
command: g++
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*g\\+\\+.*GCC.*"]
|
expectedOutput: [".*g\\+\\+.*GCC.*"]
|
||||||
- name: cmake
|
- name: cmake
|
||||||
command: cmake
|
command: cmake
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*cmake version.*"]
|
expectedOutput: [".*cmake version.*"]
|
||||||
- name: make
|
- name: make
|
||||||
command: make
|
command: make
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*GNU Make.*"]
|
expectedOutput: [".*GNU Make.*"]
|
||||||
- name: ninja
|
- name: ninja
|
||||||
command: ninja
|
command: ninja
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*1.*"]
|
expectedOutput: [".*1.*"]
|
||||||
- name: gcovr
|
- name: gcovr
|
||||||
command: gcovr
|
command: gcovr
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*gcovr.*"]
|
expectedOutput: [".*gcovr.*"]
|
||||||
- name: ccache
|
- name: ccache
|
||||||
command: ccache
|
command: ccache
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*ccache.*"]
|
expectedOutput: [".*ccache.*"]
|
||||||
- name: doxygen
|
- name: doxygen
|
||||||
command: doxygen
|
command: doxygen
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*1.*"]
|
expectedOutput: [".*1.*"]
|
||||||
- name: cppcheck
|
- name: cppcheck
|
||||||
command: cppcheck
|
command: cppcheck
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*Cppcheck.*"]
|
expectedOutput: [".*Cppcheck.*"]
|
||||||
|
|
||||||
|
|
||||||
fileExistenceTests:
|
fileExistenceTests:
|
||||||
- name: 'vcpkg'
|
- name: "vcpkg"
|
||||||
path: '/root/vcpkg'
|
path: "/root/vcpkg"
|
||||||
shouldExist: true
|
shouldExist: true
|
||||||
|
|
|
@ -1,48 +1,47 @@
|
||||||
schemaVersion: 2.0.0
|
schemaVersion: 2.0.0
|
||||||
|
|
||||||
commandTests:
|
commandTests:
|
||||||
- name: gcc compiler
|
- name: gcc compiler
|
||||||
command: gcc
|
command: gcc
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*gcc.*"]
|
expectedOutput: [".*gcc.*"]
|
||||||
- name: g++ compiler
|
- name: g++ compiler
|
||||||
command: g++
|
command: g++
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*g\\+\\+.*"]
|
expectedOutput: [".*g\\+\\+.*"]
|
||||||
- name: make
|
- name: make
|
||||||
command: make
|
command: make
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*GNU Make.*"]
|
expectedOutput: [".*GNU Make.*"]
|
||||||
- name: ninja
|
- name: ninja
|
||||||
command: /root/ninja/ninja
|
command: /root/ninja/ninja
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*1.*"]
|
expectedOutput: [".*1.*"]
|
||||||
- name: gcovr
|
- name: gcovr
|
||||||
command: gcovr
|
command: gcovr
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*gcovr.*"]
|
expectedOutput: [".*gcovr.*"]
|
||||||
- name: ccache
|
- name: ccache
|
||||||
command: ccache
|
command: ccache
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*ccache.*"]
|
expectedOutput: [".*ccache.*"]
|
||||||
- name: doxygen
|
- name: doxygen
|
||||||
command: doxygen
|
command: doxygen
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*1.*"]
|
expectedOutput: [".*1.*"]
|
||||||
- name: cppcheck
|
- name: cppcheck
|
||||||
command: cppcheck
|
command: cppcheck
|
||||||
args: ["--version"]
|
args: ["--version"]
|
||||||
expectedOutput: [".*Cppcheck.*"]
|
expectedOutput: [".*Cppcheck.*"]
|
||||||
- name: clang
|
- name: clang
|
||||||
command: /root/llvm/bin/clang
|
command: /root/llvm/bin/clang
|
||||||
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