diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 1d298f5..1e84aca 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -4,8 +4,8 @@ on: jobs: # runs on branch pushes only - ci: - name: Run Tests + ci_integration: + name: Run Integration Tests if: startsWith(github.ref, 'refs/heads') runs-on: ubuntu-18.04 steps: @@ -220,7 +220,39 @@ jobs: expected: 2 actual: ${{ steps.retry_on_error.outputs.exit_code }} - # timeout tests (takes longer to run so run last) + - name: sad-path (wrong shell for OS) + id: wrong_shell + uses: ./ + continue-on-error: true + with: + timeout_minutes: 1 + max_attempts: 2 + shell: cmd + command: 'dir' + - uses: nick-invision/assert-action@v1 + with: + expected: 2 + actual: ${{ steps.wrong_shell.outputs.total_attempts }} + - uses: nick-invision/assert-action@v1 + with: + expected: failure + actual: ${{ steps.wrong_shell.outcome }} + + ci_integration_timeout: + name: Run Integration Timeout Tests + if: startsWith(github.ref, 'refs/heads') + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 16 + - name: Install dependencies + run: npm ci + + # timeout tests (takes longer to run so run last) - name: sad-path (timeout) id: sad_path_timeout uses: ./ @@ -295,24 +327,6 @@ jobs: expected: failure actual: ${{ steps.sad_path_timeout.outcome }} - - name: sad-path (wrong shell for OS) - id: wrong_shell - uses: ./ - continue-on-error: true - with: - timeout_minutes: 1 - max_attempts: 2 - shell: cmd - command: 'dir' - - uses: nick-invision/assert-action@v1 - with: - expected: 2 - actual: ${{ steps.wrong_shell.outputs.total_attempts }} - - uses: nick-invision/assert-action@v1 - with: - expected: failure - actual: ${{ steps.wrong_shell.outcome }} - ci_windows: name: Run Windows Tests if: startsWith(github.ref, 'refs/heads') diff --git a/package-lock.json b/package-lock.json index 4350fbe..47855f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,8 @@ "prettier": "^2.7.1", "semantic-release": "19.0.3", "ts-node": "9.0.0", - "typescript": "^4.7.4" + "typescript": "^4.7.4", + "yaml-lint": "^1.7.0" } }, "node_modules/@actions/core": { @@ -1728,6 +1729,12 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, "node_modules/at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -2004,6 +2011,12 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "node_modules/consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, "node_modules/conventional-changelog-angular": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", @@ -4498,6 +4511,48 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/nconf": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.12.0.tgz", + "integrity": "sha512-T3fZPw3c7Dfrz8JBQEbEcZJ2s8f7cUMpKuyBtsGQe0b71pcXx6gNh4oti2xh5dxB+gO9ufNfISBlGvvWtfyMcA==", + "dev": true, + "dependencies": { + "async": "^3.0.0", + "ini": "^2.0.0", + "secure-keys": "^1.0.0", + "yargs": "^16.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/nconf/node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/nconf/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -7706,6 +7761,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==", + "dev": true + }, "node_modules/semantic-release": { "version": "19.0.3", "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-19.0.3.tgz", @@ -8658,6 +8719,21 @@ "node": ">= 6" } }, + "node_modules/yaml-lint": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/yaml-lint/-/yaml-lint-1.7.0.tgz", + "integrity": "sha512-zeBC/kskKQo4zuoGQ+IYjw6C9a/YILr2SXoEZA9jM0COrSwvwVbfTiFegT8qYBSBgOwLMWGL8sY137tOmFXGnQ==", + "dev": true, + "dependencies": { + "consola": "^2.15.3", + "globby": "^11.1.0", + "js-yaml": "^4.1.0", + "nconf": "^0.12.0" + }, + "bin": { + "yamllint": "dist/cli.js" + } + }, "node_modules/yargs": { "version": "17.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", @@ -9979,6 +10055,12 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, + "async": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", + "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", + "dev": true + }, "at-least-node": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", @@ -10195,6 +10277,12 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "consola": { + "version": "2.15.3", + "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz", + "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==", + "dev": true + }, "conventional-changelog-angular": { "version": "5.0.12", "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz", @@ -12025,6 +12113,41 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "nconf": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.12.0.tgz", + "integrity": "sha512-T3fZPw3c7Dfrz8JBQEbEcZJ2s8f7cUMpKuyBtsGQe0b71pcXx6gNh4oti2xh5dxB+gO9ufNfISBlGvvWtfyMcA==", + "dev": true, + "requires": { + "async": "^3.0.0", + "ini": "^2.0.0", + "secure-keys": "^1.0.0", + "yargs": "^16.1.1" + }, + "dependencies": { + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } + } + } + }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -14270,6 +14393,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha512-nZi59hW3Sl5P3+wOO89eHBAAGwmCPd2aE1+dLZV5MO+ItQctIvAqihzaAXIQhvtH4KJPxM080HsnqltR2y8cWg==", + "dev": true + }, "semantic-release": { "version": "19.0.3", "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-19.0.3.tgz", @@ -15004,6 +15133,18 @@ "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", "dev": true }, + "yaml-lint": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/yaml-lint/-/yaml-lint-1.7.0.tgz", + "integrity": "sha512-zeBC/kskKQo4zuoGQ+IYjw6C9a/YILr2SXoEZA9jM0COrSwvwVbfTiFegT8qYBSBgOwLMWGL8sY137tOmFXGnQ==", + "dev": true, + "requires": { + "consola": "^2.15.3", + "globby": "^11.1.0", + "js-yaml": "^4.1.0", + "nconf": "^0.12.0" + } + }, "yargs": { "version": "17.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz", diff --git a/package.json b/package.json index d8caec3..5029fb2 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,8 @@ "prettier": "^2.7.1", "semantic-release": "19.0.3", "ts-node": "9.0.0", - "typescript": "^4.7.4" + "typescript": "^4.7.4", + "yaml-lint": "^1.7.0" }, "lint-staged": { "**/*.ts": [ @@ -53,6 +54,9 @@ ], "**/*.{md,yaml,yml}": [ "npm run style:base --" + ], + "**/*.{yaml,yml}": [ + "npx yamllint " ] } }