Skip to content

Commit

Permalink
misc: CI improvements (GradienceTeam#700)
Browse files Browse the repository at this point in the history
# 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 <[email protected]>
Co-authored-by: 0xMRTT <[email protected]>
Co-authored-by: tfuxu <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2023
1 parent 35785c3 commit 0dbd5c8
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 158 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/[email protected]
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/[email protected]
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 changes: 0 additions & 87 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

16 changes: 12 additions & 4 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 changes: 4 additions & 2 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@
# 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]

jobs:
greeting:
runs-on: ubuntu-latest

permissions:
issues: write
pull-requests: write
steps:
- 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 changes: 53 additions & 0 deletions .github/workflows/pypi-dependencies.yml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
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 <[email protected]>"
branch: update-pypi-deps
46 changes: 0 additions & 46 deletions .github/workflows/pypi_deps.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/pysa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
# See https://pyre-check.org/docs/pysa-basics/


name: Pysa

on:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 7 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[type.po]
extend-glob = ["*.po"]
check-file = false

[type.svg]
extend-glob = ["*.svg"]
check-file = false

0 comments on commit 0dbd5c8

Please sign in to comment.