Skip to content

Commit

Permalink
Merge branch 'main' into garymm/ansible-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
priyamsahoo authored Jul 17, 2024
2 parents f02467b + 0be13a4 commit 9363e11
Show file tree
Hide file tree
Showing 121 changed files with 6,936 additions and 4,416 deletions.
18 changes: 18 additions & 0 deletions .c8rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"reporter": ["text", "html", "lcov"],
"report-dir": "./out/coverage/ui-test",
"exclude": [
"coverage/**",
"packages/*/test{,s}/**",
"**/*.d.ts",
"test{,s}/**",
"test{,-*}.{js,cjs,mjs,ts,tsx,jsx}",
"**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
"**/__tests__/**",
"**/{ava,babel,nyc}.config.{js,cjs,mjs}",
"**/jest.config.{js,cjs,mjs,ts}",
"**/{karma,rollup,webpack}.config.js",
"**/.{eslint,mocha}rc.{js,cjs}",
"**/syntaxHighlighter/**"
]
}
3 changes: 3 additions & 0 deletions .config/Taskfile_shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ env: &env
vars:
HOSTNAME:
sh: echo ${HOSTNAME:-${HOST:-$(hostname)}}
PYTHON3:
sh: echo $VIRTUAL_ENV/bin/python3
tasks:
setup:
desc: Install dependencies
Expand All @@ -22,6 +24,7 @@ tasks:
- .config/requirements.in
generates:
- out/log/manifest-{{.HOSTNAME}}.yml
- "{{.PYTHON3}}"
run: once
interactive: true
install:
Expand Down
3 changes: 3 additions & 0 deletions .config/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ PYTHONHOME
Pinkney
Pyenv
RHSSO
shiki
SIGINT
SIGTERM
Sbarnea
Expand Down Expand Up @@ -112,6 +113,7 @@ groovylint
haaaad
hbenl
hostvars
hostsvars
hotfixes
iam
icontent
Expand Down Expand Up @@ -189,6 +191,7 @@ relogin
rimraf
ritwickdey
ro
rollup
rulebooks
seealso
servernum
Expand Down
26 changes: 6 additions & 20 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
labels:
- dependabot-deps-updates
- skip-changelog
versioning-strategy: increase
open-pull-requests-limit: 2
groups:
dependencies:
patterns:
- "*"
exclude-patterns:
- "@types/vscode"
ignore:
# requires ESM https://github.com/ansible/vscode-ansible/issues/1225
- dependency-name: chai
versions: ["5.x"]
- package-ecosystem: npm
directory: /packages/ansible-language-server/
directories:
- "/"
- "/packages/ansible-language-server/"
schedule:
interval: weekly
labels:
Expand All @@ -38,6 +21,9 @@ updates:
# requires ESM https://github.com/ansible/vscode-ansible/issues/1225
- dependency-name: chai
versions: ["5.x"]
# @types/vscode should be manually bumped when we also update
# engines.vscode inside package.json
- dependency-name: "@types/vscode"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
14 changes: 8 additions & 6 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
# see https://github.com/ansible-community/devtools
_extends: ansible-community/devtools
# see https://github.com/ansible/team-devtools
_extends: ansible/team-devtools
tag-template: 'v$RESOLVED_VERSION'
category-template: '### $TITLE'
template: '$CHANGES'
version-template: $MAJOR.$MINOR
version-template: $MAJOR.$MINOR.$PATCH
# Due to vscode pre-release versioning limitations we cannot use the PATCH part
# of the MAJOR.MINOR.PATCH, so both bugfixes and minor changes will affect
# the MINOR number. Regardless this, we will still list enhancement and bugs
Expand All @@ -17,11 +17,13 @@ version-resolver:
- "major"
minor:
labels:
- "bug"
- "deprecated"
- "enhancement"
- "feature"
- "minor"
patch:
labels:
- "bug"
- "deprecated"
- "patch"
- "refactoring"
default: minor
default: patch
61 changes: 55 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
defaults:
run:
shell: ${{ matrix.shell || 'bash'}}
permissions:
id-token: write
checks: read
# The type of runner that the job will run on
runs-on: ${{ matrix.os || 'ubuntu-22.04' }}
# see https://github.com/containers/podman/issues/13609
Expand Down Expand Up @@ -100,7 +103,7 @@ jobs:
# https://github.com/marketplace/actions/setup-wsl
- name: Activate WSL
if: contains(matrix.shell, 'wsl')
uses: Vampire/setup-wsl@v3.0.0
uses: Vampire/setup-wsl@v3.1.1
with:
distribution: Ubuntu-22.04
set-as-default: "true"
Expand Down Expand Up @@ -258,15 +261,54 @@ jobs:
SKIP_DOCKER: "${{ matrix.env.SKIP_DOCKER || '0' }}"
run: task ${{ matrix.task-name-als }} --output=group --output-group-begin='::group::{{.TASK}}' --output-group-end='::endgroup::'

- name: Upload coverage data
- name: Upload coverage data (unit test)
if: ${{ startsWith(matrix.name, 'test') }}
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.name }}
token: ${{ secrets.CODECOV_TOKEN }}
files: out/coverage/lcov.info
files: out/coverage/unit/lcov.info
disable_search: true
flags: unit
fail_ci_if_error: true
use_oidc: true # cspell:ignore oidc

- name: Upload coverage data (ui test)
if: ${{ startsWith(matrix.name, 'test') }}
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.name }}
files: out/coverage/ui-test/lcov.info
disable_search: true
flags: ui
fail_ci_if_error: true
use_oidc: true # cspell:ignore oidc

- name: Upload coverage data (e2e test)
if: ${{ startsWith(matrix.name, 'test') }}
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.name }}
files: out/coverage/e2e/lcov.info
disable_search: true
flags: e2e
fail_ci_if_error: true
use_oidc: true # cspell:ignore oidc

- name: Convert coverage data (als)
if: contains(matrix.task-name-als, 'test') || contains(matrix.task-name, 'als:test')
run: |
./tools/convert-als-coverage-lcov.sh
- name: Upload coverage data (als)
if: contains(matrix.task-name-als, 'test') || contains(matrix.task-name, 'als:test')
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.name }}
files: out/coverage/als/lcov.info
disable_search: true
flags: als
fail_ci_if_error: true
use_oidc: true # cspell:ignore oidc

- name: Upload vsix artifact
if: ${{ matrix.name == 'test' }}
Expand Down Expand Up @@ -354,6 +396,8 @@ jobs:
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0

- run: corepack enable

Expand All @@ -371,9 +415,14 @@ jobs:
yarn install --immutable
ls -la *.vsix
- name: Publish to extension to marketplaces
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Publish extension to marketplaces
run: |
./tools/publish.sh
./tools/helper --publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
Expand Down
2 changes: 1 addition & 1 deletion .nycrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ recursive: true
require:
- ts-node/register
temp-dir: out/.nyc_output
report-dir: out/coverage
report-dir: out/coverage/unit
# skip-full: true
# increase threshold % once possible:
lines: 2.7
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ exclude: >
minimum_pre_commit_version: 2.9.0 # types_or
repos:
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.7.0
rev: v8.9.0
hooks:
- id: cspell
# name: Spell check with cspell
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
pass_filenames: false # we want to use its own config
Expand Down Expand Up @@ -144,9 +144,9 @@ repos:
packages/ansible-language-server/test/testFixtures/diagnostics/yaml/invalid_yaml.yml|
packages/ansible-language-server/test/fixtures/diagnostics/invalid_yaml.yml
)$
- repo: https://github.com/pre-commit/mirrors-prettier
- repo: https://github.com/pycontribs/mirrors-prettier
# keep it before markdownlint and eslint
rev: "v4.0.0-alpha.8"
rev: "v3.3.2"
hooks:
- id: prettier
types_or: ["markdown", "json", "ts"]
Expand All @@ -157,15 +157,15 @@ repos:
docs/als/settings.md
)$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
rev: v0.41.0
hooks:
- id: markdownlint
exclude: >
(?x)^
docs/als/settings.md
$
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.14.0
rev: v9.16.0
hooks:
- id: commitlint
stages: [commit-msg]
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
direnv 2.34.0
nodejs 18.19.1
task 3.33.1
# asdf install task latest
task 3.37.2
yarn 1.22.19
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
!media/playbookGeneration/playbookGeneration.css
!media/playbookGeneration/style.css
!out/client/src/extension.js
!out/syntaxHighlighter/src/syntaxHighlighter.js
!out/client/webview/apps/lightspeed/main.js
!out/client/webview/apps/lightspeed/explorer/main.js
!out/client/webview/apps/lightspeed/playbookExplanation/main.js
Expand Down
Loading

0 comments on commit 9363e11

Please sign in to comment.