Skip to content

Commit

Permalink
Use shared CI workflows from beeware/.github
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Feb 6, 2023
1 parent 3f77cf0 commit 34a1e62
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 54 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates on Sunday, 8PM UTC
interval: "weekly"
day: "sunday"
time: "20:00"
68 changes: 16 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,65 +6,29 @@ on:
- main
workflow_call:

env:
python_version: "3.9"

defaults:
run:
shell: bash # https://github.com/beeware/briefcase/pull/912

jobs:
pre-commit:
name: Pre-commit checks
# TODO:PR: replace with real workflow once its merged
uses: rmartin16/.github-beeware/.github/workflows/pre-commit-run.yml@shared-ci
with:
pre-commit-source: 'pre-commit'

verify-apps:
name: Build apps
needs: pre-commit
# TODO:PR: replace with real workflow once its merged
uses: rmartin16/.github-beeware/.github/workflows/verify-app-build.yml@shared-ci
with:
runner-os: ${{ matrix.runner-os }}
framework: ${{ matrix.framework }}
target-platform: web
target-format: static
strategy:
matrix:
os_name: ["macOS", "windows", "linux"]
runner-os: [ "macos-latest", "windows-latest", "ubuntu-latest" ]
framework: ["toga"]
include:
- os_name: macOS
platform: macos-12
briefcase-data-dir: ~/Library/Caches/org.beeware.briefcase
pip-cache-dir: ~/Library/Caches/pip
docker-cache-dir: ~/Library/Containers/com.docker.docker/Data/vms/0/
- os_name: windows
platform: windows-latest
briefcase-data-dir: ~\AppData\Local\BeeWare\briefcase\Cache
pip-cache-dir: ~\AppData\Local\pip\Cache
docker-cache-dir: C:\ProgramData\DockerDesktop
- os_name: linux
# Need to use at least 22.04 to get the bugfix in flatpak for handling spaces in filenames.
platform: ubuntu-22.04
briefcase-data-dir: ~/.cache/briefcase
pip-cache-dir: ~/.cache/pip
# cache action cannot cache docker images (actions/cache#31)
# docker-cache-dir: /var/lib/docker
runs-on: ${{ matrix.platform }}
steps:
- name: Cache Briefcase tools
uses: actions/cache@v3.0.11
with:
key: briefcase-${{ matrix.platform }}
path: |
~/.cookiecutters
${{ matrix.briefcase-data-dir }}
${{ matrix.pip-cache-dir }}
${{ matrix.docker-cache-dir }}
- uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4.3.0
with:
python-version: ${{ env.python_version }}
- name: Install system dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get install -y flatpak flatpak-builder
- name: Install packages
run: pip install briefcase
- name: Build Web App
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create web
briefcase build web
briefcase package web
12 changes: 12 additions & 0 deletions .github/workflows/pre-commit-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Update pre-commit

on:
schedule:
- cron: "0 20 * * SUN" # Sunday @ 2000 UTC
workflow_dispatch:

jobs:
pre-commit-update:
name: Update pre-commit
uses: beeware/.github/.github/workflows/pre-commit-update.yml@main
secrets: inherit
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tmp
*~
.vscode
.idea
.project
.settings
.classpath
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: check-case-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: check-xml
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ BeeWare <3's contributions!
Please be aware, BeeWare operates under a Code of Conduct.

See [CONTRIBUTING to BeeWare](http://beeware.org/contributing) for details.

2 changes: 1 addition & 1 deletion {{ cookiecutter.formal_name }}/www/static/wheels/README
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The wheels for the application goes here.
The wheels for the application goes here.

0 comments on commit 34a1e62

Please sign in to comment.