Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# For our project, we generate this file through a build process from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist/

on:
merge_group:
branches:
Expand All @@ -18,26 +17,20 @@ on:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/checkout@v6.0.1
- name: Set Node.js 20.x
uses: actions/setup-node@v4.4.0
uses: actions/setup-node@v6.1.0
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Rebuild the dist/ directory
run: npm run prepare

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
Expand All @@ -46,9 +39,8 @@ jobs:
exit 1
fi
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6.0.0
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
68 changes: 29 additions & 39 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@
# supported CodeQL languages.
#
name: "CodeQL"

on:
merge_group:
branches:
- v2
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '24 5 * * 6'

jobs:
analyze:
name: Analyze
Expand All @@ -31,45 +29,37 @@ jobs:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Checkout repository
uses: actions/checkout@v6.0.1
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4.31.9
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v4.31.9
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
uses: github/codeql-action/analyze@v4.31.9
4 changes: 1 addition & 3 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Release Drafter

on:
workflow_dispatch:
push:
# branches to consider in the event; optional, defaults to all
branches:
- v2

jobs:
update_release_draft:
runs-on: ubuntu-24.04
steps:
- uses: release-drafter/release-drafter@v6
- uses: release-drafter/release-drafter@v6.1.0
with:
config-name: release-drafter.yaml
publish: startsWith(github.ref, "refs/tags")
Expand Down
35 changes: 13 additions & 22 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,36 @@
---
name: Test

on:
merge_group:
branches:
- v2
workflow_dispatch:
pull_request:

jobs:
# unit tests
units:
name: Test Javascript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set Node.js 20.x
uses: actions/setup-node@v4.4.0
with:
node-version: 20
cache: npm

- name: Install Dependencies
run: npm ci

- name: Run Lint Test
run: npm run lint

- name: Run tests
run: npm test

- uses: actions/checkout@v6.0.1
- name: Set Node.js 20.x
uses: actions/setup-node@v6.1.0
with:
node-version: 20
cache: npm
- name: Install Dependencies
run: npm ci
- name: Run Lint Test
run: npm run lint
- name: Run tests
run: npm test
e2e:
name: Test Updatecli Github Action
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v4

uses: actions/checkout@v6.0.1
- name: Install Updatecli
uses: ./

- name: Test local action without install-only
run: updatecli diff --config testdata/updatecli.d/test.yaml