Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ package-lock.json

# Jest
coverage/
junit.xml
junit*.xml
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ This is a monorepo containing a collection of GitHub Actions maintained by Lizar

## actions

| Action | Description | Type | Language |
|---------------------------------------------------------------|---------------------------------------------------------------------------------|-----------|------------------|
| [audit_repos](actions/audit_repos#readme) | Audit repositories in an organization | composite | javascript |
| [check_trailing_spaces](actions/check_trailing_spaces#readme) | Check files for trailing spaces, empty lines at EOF, and missing newline at EOF | composite | javascript |
| [facebook_post](actions/facebook_post#readme) | Post to Facebook page/group using Graph API | docker | python |
| [get_changed_files](actions/get_changed_files#readme) | Get the list of changed files in a pull request | composite | javascript |
| [monitor_space](actions/monitor_space#readme) | Monitor and track minimum free disk space | composite | bash |
| [pinact](actions/pinact#readme) | Run pinact against repositories in an organization and create PRs for updates | composite | javascript |
| [more_space](actions/more_space#readme) | Free up disk space in GitHub Actions runners | composite | bash |
| [release_changelog](actions/release_changelog#readme) | Generate a changelog for the latest release | composite | javascript |
| [release_create](actions/release_create#readme) | Create a new release | composite | bash, javascript |
| [release_homebrew](actions/release_homebrew#readme) | Validate and update Homebrew formula | composite | bash, python |
| [release_setup](actions/release_setup#readme) | Prepare a release | docker | python |
| [screenshot](actions/screenshot#readme) | Setup cross-platform screenshot CLI tool | composite | bash |
| [setup_cuda](actions/setup_cuda#readme) | Set up NVIDIA CUDA Toolkit on Linux runners | composite | bash |
| [setup_python](actions/setup_python#readme) | Set up Python environment | composite | bash |
| [setup_virtual_desktop](actions/setup_virtual_desktop#readme) | Setup virtual desktop for GUI apps on Linux | composite | bash |
| Action | Description | Type | Language |
|-------------------------------------------------------|---------------------------------------------------------------------------------|-----------|------------------|
| [audit_repos](actions/audit_repos#readme) | Audit repositories in an organization | composite | javascript |
| [facebook_post](actions/facebook_post#readme) | Post to Facebook page/group using Graph API | docker | python |
| [get_changed_files](actions/get_changed_files#readme) | Get the list of changed files in a pull request | composite | javascript |
| [monitor_space](actions/monitor_space#readme) | Monitor and track minimum free disk space | composite | bash |
| [pinact](actions/pinact#readme) | Run pinact against repositories in an organization and create PRs for updates | composite | javascript |
| [more_space](actions/more_space#readme) | Free up disk space in GitHub Actions runners | composite | bash |
| [release_changelog](actions/release_changelog#readme) | Generate a changelog for the latest release | composite | javascript |
| [release_create](actions/release_create#readme) | Create a new release | composite | bash, javascript |
| [release_homebrew](actions/release_homebrew#readme) | Validate and update Homebrew formula | composite | bash, python |
| [release_setup](actions/release_setup#readme) | Prepare a release | docker | python |
| [screenshot](actions/screenshot#readme) | Setup cross-platform screenshot CLI tool | composite | bash |
| [setup_cuda](actions/setup_cuda#readme) | Set up NVIDIA CUDA Toolkit on Linux runners | composite | bash |
| [setup_python](actions/setup_python#readme) | Set up Python environment | composite | bash |
| [trailing_spaces](actions/trailing_spaces#readme) | Check files for trailing spaces, empty lines at EOF, and missing newline at EOF | composite | javascript |
| [virtual_desktop](actions/virtual_desktop#readme) | Setup virtual desktop for GUI apps on Linux | composite | bash |

## Contributions

Expand Down
4 changes: 2 additions & 2 deletions actions/screenshot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Linux requires a display server (X11 or Wayland) to be running. Use the virtual

```yaml
- name: Setup virtual display
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: xfce
```
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup virtual desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: xfce

Expand Down
6 changes: 3 additions & 3 deletions actions/screenshot/pre-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ echo "Pre-CI: Setting up display for screenshot tests..."
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "Detected Linux - setting up virtual desktop..."

# Call the setup_virtual_desktop action's setup script
chmod +x ./actions/setup_virtual_desktop/setup_desktop.sh
./actions/setup_virtual_desktop/setup_desktop.sh \
# Call the virtual_desktop action's setup script
chmod +x ./actions/virtual_desktop/setup_desktop.sh
./actions/virtual_desktop/setup_desktop.sh \
--environment=xfce \
--display-size=1280x720

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# check_trailing_spaces
# trailing_spaces

Check files for trailing spaces, empty lines at EOF, and missing newline at EOF.

Expand All @@ -17,7 +17,7 @@ steps:
uses: actions/checkout@v4

- name: Check trailing spaces
uses: LizardByte/actions/actions/check_trailing_spaces@master
uses: LizardByte/actions/actions/trailing_spaces@master
```

## 📥 Inputs
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
uses: actions/checkout@v4

- name: Check trailing spaces
uses: LizardByte/actions/actions/check_trailing_spaces@master
uses: LizardByte/actions/actions/trailing_spaces@master
```

### Check all files in the repository
Expand All @@ -84,7 +84,7 @@ steps:
uses: actions/checkout@v4

- name: Check all files for trailing spaces
uses: LizardByte/actions/actions/check_trailing_spaces@master
uses: LizardByte/actions/actions/trailing_spaces@master
with:
check_all_files: 'true'
source_directory: '.'
Expand All @@ -98,7 +98,7 @@ steps:
uses: actions/checkout@v4

- name: Check trailing spaces (skip binary/generated files)
uses: LizardByte/actions/actions/check_trailing_spaces@master
uses: LizardByte/actions/actions/trailing_spaces@master
with:
check_all_files: 'true'
ignore_patterns: |
Expand All @@ -120,7 +120,7 @@ steps:
uses: LizardByte/actions/actions/get_changed_files@master

- name: Check trailing spaces
uses: LizardByte/actions/actions/check_trailing_spaces@master
uses: LizardByte/actions/actions/trailing_spaces@master
with:
changed_files: ${{ steps.changed_files.outputs.changed_files }}
```
Expand All @@ -133,7 +133,7 @@ steps:
uses: actions/checkout@v4

- name: Check only trailing spaces (skip EOF checks)
uses: LizardByte/actions/actions/check_trailing_spaces@master
uses: LizardByte/actions/actions/trailing_spaces@master
with:
check_empty_line_at_eof: 'false'
check_missing_newline_at_eof: 'false'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ runs:
with:
github-token: ${{ inputs.token }}
script: |
const script = require('${{ github.action_path }}/check_trailing_spaces.js');
const script = require('${{ github.action_path }}/trailing_spaces.js');
await script({ github, context, core });
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setup_virtual_desktop
# virtual_desktop

A reusable action to set up a virtual desktop environment on Linux GitHub Actions runners for GUI applications,
system tray icons, and notifications.
Expand All @@ -17,7 +17,7 @@ See [action.yml](action.yml)
```yaml
steps:
- name: Setup virtual desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
appindicator-version: ayatana
display-size: 1280x720
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup virtual desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: xfce

Expand All @@ -167,7 +167,7 @@ jobs:

- name: Setup virtual desktop
id: desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
appindicator-version: ayatana
display-size: 1920x1080
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup virtual desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: xfce

Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup virtual desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: openbox
display-size: 1024x768
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup 4K virtual desktop
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: lxde
display-size: 3840x2160
Expand All @@ -289,7 +289,7 @@ jobs:
desktop: [xfce, lxde, openbox, fluxbox]
steps:
- name: Setup ${{ matrix.desktop }}
uses: LizardByte/actions/actions/setup_virtual_desktop@master
uses: LizardByte/actions/actions/virtual_desktop@master
with:
environment: ${{ matrix.desktop }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "lizardbyte-actions-setup-virtual-desktop"
name = "lizardbyte-actions-virtual-desktop"
version = "0.0.0"
description = "Setup virtual desktop action for GitHub workflows."
requires-python = ">=3.12"
Expand Down
25 changes: 25 additions & 0 deletions tests/test_actions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# standard imports
import os

# lib imports
import pytest

ACTIONS_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'actions')
MAX_ACTION_NAME_LENGTH = 17


def get_action_names():
"""Return a list of directory names inside the actions directory."""
return [
name for name in os.listdir(ACTIONS_DIR)
if os.path.isdir(os.path.join(ACTIONS_DIR, name)) and not name.startswith('_') and not name.startswith('.')
]


@pytest.mark.parametrize('action_name', get_action_names())
def test_action_name_length(action_name):
"""Action directory names must not exceed 17 characters."""
assert len(action_name) <= MAX_ACTION_NAME_LENGTH, (
f"Action name '{action_name}' is {len(action_name)} characters long, "
f"but must be no more than {MAX_ACTION_NAME_LENGTH} characters."
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const fs = require('node:fs');

const { createMockContext, createMockGithub, createMockCore, setupConsoleMocks } = require('../testUtils.js');

const checkTrailingSpacesAction = require('../../actions/check_trailing_spaces/check_trailing_spaces.js');
const checkTrailingSpacesAction = require('../../actions/trailing_spaces/trailing_spaces.js');
const {
isTextFile,
shouldIgnoreFile,
Expand Down
Loading