Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Actions #3

Merged
merged 31 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b11c785
feat(actions): Pylint
ncvescera May 20, 2023
55c8d8d
feat(actions): Dependabot
ncvescera May 20, 2023
01bec12
feat(actions): Better Linters
ncvescera May 20, 2023
66a8265
feat(actions): Auto Release
ncvescera May 20, 2023
db233c9
fix(actions): Auto PR problema con i Fork
ncvescera May 20, 2023
474575f
fix(actions): Linter
ncvescera May 26, 2023
6b85c3f
fix(actions): Lint
ncvescera May 26, 2023
ee03717
fix(actions): Auto release
ncvescera May 26, 2023
f55a820
feat(actions): Build on AARCH64
ncvescera May 27, 2023
f5dcfd3
fix(actions): Linter
ncvescera May 27, 2023
88b2dee
fix(actions): Auto release
ncvescera May 27, 2023
e00e4b4
fix(actions): Rimosso file
ncvescera May 27, 2023
a32818c
fix(actions): DevBuild
ncvescera May 28, 2023
909cab2
fix(actions): Auto release
ncvescera May 28, 2023
9d99e0a
fix(actions): DevBuild
ncvescera May 28, 2023
303d273
fix(actions): Builder & Linter
ncvescera May 28, 2023
d41e00e
fix(actions): DevBuild
ncvescera Jun 1, 2023
07ea356
fix(actions): Auto release
ncvescera Jun 1, 2023
358d511
fix(actions): ESLint
ncvescera Jun 1, 2023
fe401bd
fix(actions): Linter
ncvescera Jun 1, 2023
4ea50a3
fix(actions): Linter
ncvescera Jun 1, 2023
b21ea7c
fix(actions): Lint
ncvescera Jun 1, 2023
b3ef6ca
fix(actions): ESLint
ncvescera Jun 1, 2023
36950ce
fix(actions): Linter
ncvescera Jun 1, 2023
701361d
fix(actions): Lint typo
ncvescera Jun 1, 2023
ec57f9e
fix(actions0): ESLint
ncvescera Jun 1, 2023
99cc9e0
fix(actions): Linter
ncvescera Jun 1, 2023
f459a4b
fix(actions): Lint typo
ncvescera Jun 1, 2023
4aa1d55
fix: Aggiornato comando per linter
ncvescera Jun 1, 2023
76f0cc3
fix: DevDependencies
ncvescera Jun 1, 2023
e14e8b4
Merge branch 'develop' into feature/actions
ncvescera Jun 7, 2023
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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
64 changes: 64 additions & 0 deletions .github/workflows/aarch64-devbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Build on ARM"

on:
push:
branches:
- 'testing-build'

permissions:
id-token: write
contents: write
packages: write
pull-requests: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Build on ARM
uses: pguyot/arm-runner-action@v2
id: build_image
with:
copy_artifact_path: dist/react-pywebview-boilerplate
copy_artifact_dest: .
base_image: raspios_lite:latest
cpu: cortex-a7
cpu_info: cpuinfo/raspberrypi_3b
image_additional_mb: 4096
commands: |
sudo apt update
sudo apt install python3-pip -y
pip3 install virtualenv
curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
sudo apt install nodejs -y
npm install --global yarn
yarn run init
export CI=false
yarn run build
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: devbuild
path: react-pywebview-boilerplate

prerelease:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Download Executable
uses: actions/download-artifact@v3
with:
name: devbuild
- name: Create DevBuild
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
react-pywebview-boilerplate
65 changes: 65 additions & 0 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Create Release

on:
pull_request:
branches:
- main
types:
- closed

permissions:
id-token: write
contents: write
packages: write
pull-requests: read

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Build on ARM
uses: pguyot/arm-runner-action@v2
id: build_image
with:
copy_artifact_path: dist/react-pywebview-boilerplate
copy_artifact_dest: .
base_image: raspios_lite:latest
cpu: cortex-a7
cpu_info: cpuinfo/raspberrypi_3b
image_additional_mb: 4096
commands: |
sudo apt update
sudo apt install python3-pip -y
pip3 install virtualenv
curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
sudo apt install nodejs -y
npm install --global yarn
yarn run init
yarn run build
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: releasebuild
path: react-pywebview-boilerplate

release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Download Executable
uses: actions/download-artifact@v3
with:
name: releasebuild
- name: Create Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ github.event.pull_request.title }}"
prerelease: false
files: |
react-pywebview-boilerplate
42 changes: 42 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Lint

on:
# Replace pull_request with pull_request_target if you
# plan to use this action with forks, see the Limitations section
pull_request:
branches:
- main
- develop

# Down scope as necessary via https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
checks: write
contents: write

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8

# fix temporaneo. @Fabrizio ricontrollare configurazione di eslint
- name: Install Node.js dependencies
run: yarn install

- name: Run linters
uses: wearerequired/lint-action@v2
with:
xo: true
flake8: true
29 changes: 17 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,19 @@
"cleanall:windows": "if exist node_modules rd /S /Q node_modules & if exist venv-pywebview rd /S /Q venv-pywebview",
"init": "yarn install && run-script-os",
"init:windows": "virtualenv -p python venv-pywebview && .\\venv-pywebview\\Scripts\\pip install -r requirements.txt",
"init:linux": "virtualenv -p python3 venv-pywebview && if [[ -z \"${KDE_FULL_SESSION}\" ]]; then yarn run init:qt5; else yarn run init:gtk; fi",
"init:default": "virtualenv -p python3 venv-pywebview && ./venv-pywebview/bin/pip install -r requirements.txt",
"init:qt5": "./venv-pywebview/bin/pip install pyqt5 pyqtwebengine -r requirements.txt",
"init:gtk": "./venv-pywebview/bin/pip install pycairo PyGObject -r requirements.txt",
"//init:gtk": "sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 && ./venv-pywebview/bin/pip install pycairo pygobject -r requirements.txt",
"init:linux": "virtualenv -p python3 venv-pywebview && yarn run init:gtk",
"init:default": "virtualenv -p python4 venv-pywebview && ./venv-pywebview/bin/pip install -r requirements.txt",
"init:gtk": "sudo apt install -y libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0 && ./venv-pywebview/bin/pip install pycairo pygobject -r requirements.txt",
"init:docs": "./venv-pywebview/bin/pip install pylama yapf",
"start": "export NODE_OPTIONS='--openssl-legacy-provider' && yarn run frontend:dev && run-script-os",
"start:windows": ".\\venv-pywebview\\Scripts\\python src\\index.py",
"start:default": "./venv-pywebview/bin/python src/index.py",
"pylintcheck": "pylama -f pylint ./src/",
"pylint": "yapf --recursive -i ./src/"
"pylint": "yapf --recursive -i ./src/",
"lint": "xo src/"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
"xo": {
"extends": "xo-react"
},
"browserslist": {
"production": [
Expand All @@ -71,6 +67,15 @@
]
},
"devDependencies": {
"run-script-os": "^1.1.6"
"eslint": "^8.41.0",
"eslint-config-standard": "^17.1.0",
"eslint-config-xo-react": "^0.27.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"run-script-os": "^1.1.6",
"xo": "^0.54.2"
}
}