Skip to content

Commit

Permalink
re-organize test suite & ready for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Jul 25, 2021
1 parent f39083b commit dcf5d69
Show file tree
Hide file tree
Showing 14 changed files with 430 additions and 276 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,29 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Check python package:
runs-on: ubuntu-latest
steps:
- name: Checkout this Repo
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Install Dependencies
run: |
pip install -r requirements.txt
pip install pylint
- name: Check formatting
run: pylint rmskin_builder.py

Build:
# needs: Checkpython package
runs-on: ubuntu-latest
steps:
# Checkout code
- name: Checkout this Repo
uses: actions/checkout@v2

Expand All @@ -25,8 +44,8 @@ jobs:
- name: Run Build action
id: builder
uses: 2bndy5/rmskin-action@master
# with:
# path: ${{ github.workspace }}
with:
path: ${{ github.workspace }}/tests

# Use the output from the `builder` step
- name: Print the output filename
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,7 @@ dmypy.json
.pyre/

# vscode folder
.vscode/
.vscode/

# ignore local test's output files
*.rmskin
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ FROM python:latest

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY enter_rmskin_builder.sh /enter_rmskin_builder.sh
COPY release.py /rmskin_builder.py
COPY rmskin_builder.py /rmskin_builder.py
COPY requirements.txt /reqs.txt
RUN chmod +x /enter_rmskin_builder.sh

# Code file to execute when the docker container starts up (`enter_rmskin_builder.sh`)
ENTRYPOINT ["/enter_rmskin_builder.sh"]
ENTRYPOINT ["/enter_rmskin_builder.sh"]
35 changes: 25 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
.. image:: https://github.com/2bndy5/rmskin-action/workflows/CI/badge.svg
:target: https://github.com/2bndy5/rmskin-action/actions


rmskin-action
=============

A Python-based Github action tool to package a Repository's Rainmeter Content into a validating .rmskin file for Rainmeter's Skin Installer.

.. important:: If the repository contains a RMSKIN.bmp image to used as a header image in the rmskin package, then it must be using 24-bit colors. Additionally, if the image is not exactly 400x60, then this action's python script will resize it accordingly.

.. important::
If the repository contains a RMSKIN.bmp image to used as a header image in the rmskin package, then it must be using 24-bit colors.
Additionally, if the image is not exactly 400x60, then this action's python script will resize it accordingly.

Input Arguments
===============
Expand All @@ -24,7 +24,7 @@ Input Arguments
"path", "Base directory of repo being packaged. Defaults to workflow's workspace path", "no"
"dir_out", "Path to save generated rmskin package. Defaults to workflow's workspace path", "no"

.. note::
.. note::
You can use your repository's ``RMSKIN.ini`` file to override any above inputs except ``dir_out`` & ``path`` inputs.

Output Arguments
Expand All @@ -33,18 +33,34 @@ Output Arguments
* ``arc_name`` : The name of the generated rmskin file saved in the
path specified by ``dir_out`` input argument.

Ideal Repo Structure
====================

- root directory

* ``Skins`` <- a folder to contain all necessary Rainmeter skins
* ``RMSKIN.ini`` <- list of options specific to installing the skin(s)
* ``Layouts`` <- a folder that contains Rainmeter layout files
* ``Plugins`` <- a folder that contains Rainmeter plugins
* ``@Vault`` <- resources folder accessible by all installed skins

.. seealso::
`A cookiecutter repository <https://github.com/2bndy5/Rainmeter-Cookiecutter>`_
has also been created to facilitate development of Rainmeter skins on Github
quickly.

Example Usage
=============

.. code-block:: yaml
name: RMSKIN Packager
on:
on:
push:
pull_request:
release:
types:
types:
- published
jobs:
Expand All @@ -64,7 +80,7 @@ Example Usage
# Use the output from the `builder` step
- name: Print the output filename
run: echo "The output file was ${{ steps.builder.outputs.arc_name }}"
# get release upload_url
- name: Get Release
id: get_release
Expand All @@ -75,7 +91,7 @@ Example Usage
# Upload the asset
- name: Upload Release Asset
id: upload-release-asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
if: github.event_name == 'release'
env:
Expand All @@ -85,4 +101,3 @@ Example Usage
asset_path: ./${{ steps.builder.outputs.arc_name }}
asset_name: ${{ steps.builder.outputs.arc_name }}
asset_content_type: application/zip
Loading

0 comments on commit dcf5d69

Please sign in to comment.