mirror of
https://github.com/GradienceTeam/Gradience.git
synced 2024-04-26 16:27:23 +00:00
misc: CI improvements (#700)
# Description Made several improvements to workflow files and added a new Typos workflow. _We probably should squash this on merge_ ## Type of change <!-- What type of change does your pull request introduce? Put an `x` in the box that apply. --> - [ ] Bugfix (Change which fixes a issue) - [ ] New feature (Change which adds new functionality) - [x] Enhancement (Change which slightly improves existing code) - [ ] Breaking change (This change will introduce incompatibility with existing functionality) ## Changelog <!-- This is optional, but highly appreciated. --> - Beautified some workflow files - Updated text in Greetings action - Changed `pypi_deps.yml` file name to `pypi-dependencies.yml` - Added new typo checking workflow ## Testing - [x] I have tested my changes and verified that they work as expected <!-- Required, your PR won't be accepted if you don't do this step. --> ### How to test the changes <!-- Optional, it can speed up review process if you provide the information on how to test your changes. --> No information provided. Signed-off-by: tfuxu <73042332+tfuxu@users.noreply.github.com> Co-authored-by: 0xMRTT <0xMRTT@proton.me> Co-authored-by: tfuxu <73042332+tfuxu@users.noreply.github.com>
This commit is contained in:
parent
35785c30c7
commit
0dbd5c809c
41
.github/workflows/build.yml
vendored
41
.github/workflows/build.yml
vendored
|
@ -19,12 +19,12 @@ name: Build
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
flatpak:
|
||||
name: "Flatpak"
|
||||
name: Flatpak
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: bilelmoussaoui/flatpak-github-actions:gnome-nightly
|
||||
|
@ -35,20 +35,23 @@ jobs:
|
|||
# Don't fail the whole workflow if one architecture fails
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Install deps
|
||||
run: |
|
||||
dnf -y install docker
|
||||
- name: Set up QEMU
|
||||
id: qemu
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
with:
|
||||
platforms: arm64
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v5
|
||||
with:
|
||||
repository-name: gnome-nightly
|
||||
bundle: gradience-devel.flatpak
|
||||
manifest-path: build-aux/flatpak/com.github.GradienceTeam.Gradience.Devel.json
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
arch: ${{ matrix.arch }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
dnf -y install docker
|
||||
|
||||
- name: Set up QEMU
|
||||
id: qemu
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
with:
|
||||
platforms: arm64
|
||||
|
||||
- uses: flatpak/flatpak-github-actions/flatpak-builder@v5
|
||||
with:
|
||||
repository-name: gnome-nightly
|
||||
bundle: gradience-devel.flatpak
|
||||
manifest-path: build-aux/flatpak/com.github.GradienceTeam.Gradience.Devel.json
|
||||
cache-key: flatpak-builder-${{ github.sha }}
|
||||
arch: ${{ matrix.arch }}
|
||||
|
|
87
.github/workflows/codeql-analysis.yml
vendored
87
.github/workflows/codeql-analysis.yml
vendored
|
@ -1,87 +0,0 @@
|
|||
# Change the look of Adwaita, with ease
|
||||
# Copyright (C) 2022 Gradience Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "main" ]
|
||||
schedule:
|
||||
- cron: '21 6 * * 5'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'python' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# 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.
|
||||
|
||||
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# 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@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
|
||||
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
||||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
||||
|
||||
# - run: |
|
||||
# echo "Run, Build Application using script"
|
||||
# ./location_of_script_within_repo/buildscript.sh
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
16
.github/workflows/dependency-review.yml
vendored
16
.github/workflows/dependency-review.yml
vendored
|
@ -4,8 +4,15 @@
|
|||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
|
||||
name: Dependency Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0,12 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -14,7 +21,8 @@ jobs:
|
|||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout Repository'
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Dependency Review'
|
||||
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@v3
|
||||
|
|
6
.github/workflows/greetings.yml
vendored
6
.github/workflows/greetings.yml
vendored
|
@ -14,6 +14,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
@ -21,6 +22,7 @@ on: [pull_request_target, issues]
|
|||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
@ -28,5 +30,5 @@ jobs:
|
|||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/4njFDtfGEZ"
|
||||
pr-message: "Welcome on Gradience. 🥳 We really appreciate your pull request. The core team will review your issue as soon as possible. You can also join the matrix room https://matrix.to/#/#Gradience-space:envs.net or the discord server https://discord.com/invite/4njFDtfGEZ."
|
||||
issue-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your issue as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ"
|
||||
pr-message: "Welcome on Gradience. 🥳 We really appreciate your contribution. The core team will review your pull request as soon as possible. You can also join the Matrix room: https://matrix.to/#/#Gradience-space:envs.net or the Discord server: https://discord.com/invite/4njFDtfGEZ."
|
||||
|
|
53
.github/workflows/pypi-dependencies.yml
vendored
Normal file
53
.github/workflows/pypi-dependencies.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Change the look of Adwaita, with ease
|
||||
# Copyright (C) 2022 Gradience Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
name: Generate PyPI Dependencies
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths: requirements.txt
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Run a multi-line script
|
||||
run: |
|
||||
curl -O https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator
|
||||
chmod +x flatpak-pip-generator
|
||||
python -m pip install requirements-parser
|
||||
./flatpak-pip-generator --requirements-file=requirements.txt --output pypi-dependencies
|
||||
mv pypi-dependencies.json build-aux/flatpak/pypi-dependencies.json
|
||||
|
||||
- name: Create pull request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
author: "AdwCustomizer <AdwCustomizerTeam@proton.me>"
|
||||
title: "meta: update PyPI dependencies for Flatpak"
|
||||
body: "This automated PR contains an auto-generated `pypi-dependencies.json` file used in Flatpak manifests."
|
||||
labels: flatpak, ci/automated-pr
|
||||
commit-message: "meta: update Flatpak PyPI dependencies"
|
||||
committer: "AdwCustomizer <AdwCustomizerTeam@proton.me>"
|
||||
branch: update-pypi-deps
|
46
.github/workflows/pypi_deps.yml
vendored
46
.github/workflows/pypi_deps.yml
vendored
|
@ -1,46 +0,0 @@
|
|||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: Generate PYPI Dependencies
|
||||
|
||||
# Controls when the workflow will run
|
||||
on:
|
||||
# Triggers the workflow on push or pull request events but only for the "main" branch
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths: requirements.txt
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
# Runs a set of commands using the runners shell
|
||||
- name: Run a multi-line script
|
||||
run: |
|
||||
curl -O https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator
|
||||
chmod +x flatpak-pip-generator
|
||||
python -m pip install requirements-parser
|
||||
./flatpak-pip-generator --requirements-file=requirements.txt --output pypi-dependencies
|
||||
mv pypi-dependencies.json build-aux/flatpak/pypi-dependencies.json
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
with:
|
||||
commit-message: "ci: update Flatpak pypi dependencies"
|
||||
title: Update `pypi-dependencies.json`
|
||||
body: This is an auto-generated PR with the generation of `pypi-dependencies.json`.
|
||||
labels: flatpak, automated pr
|
||||
committer: "AdwCustomizer <AdwCustomizerTeam@proton.me>"
|
||||
author: "AdwCustomizer <AdwCustomizerTeam@proton.me>"
|
||||
branch: pypi-deps
|
1
.github/workflows/pysa.yml
vendored
1
.github/workflows/pysa.yml
vendored
|
@ -12,6 +12,7 @@
|
|||
#
|
||||
# See https://pyre-check.org/docs/pysa-basics/
|
||||
|
||||
|
||||
name: Pysa
|
||||
|
||||
on:
|
||||
|
|
36
.github/workflows/typos.yml
vendored
Normal file
36
.github/workflows/typos.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Change the look of Adwaita, with ease
|
||||
# Copyright (C) 2022 Gradience Team
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
name: Typos
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 0,12 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
typos:
|
||||
name: Typos
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check for typos
|
||||
uses: crate-ci/typos@master
|
||||
with:
|
||||
config: typos.toml
|
7
typos.toml
Normal file
7
typos.toml
Normal file
|
@ -0,0 +1,7 @@
|
|||
[type.po]
|
||||
extend-glob = ["*.po"]
|
||||
check-file = false
|
||||
|
||||
[type.svg]
|
||||
extend-glob = ["*.svg"]
|
||||
check-file = false
|
Loading…
Reference in a new issue