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 aeab5ae commit b87cf0b
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 52 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: 20 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,30 @@ on:

defaults:
run:
shell: bash # https://github.com/beeware/briefcase/pull/912
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:
python-version: ${{ matrix.python-version }}
runner-os: ${{ matrix.runner-os }}
framework: ${{ matrix.framework }}
target-platform: android
target-format: gradle
strategy:
fail-fast: false
matrix:
os_name: ["macOS", "windows", "linux"]
python_version: ["3.8", "3.9", "3.10", "3.11"]
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 }}-${{ matrix.python_version }}
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: ${{ matrix.python_version }}
- name: Install packages
run: pip install briefcase
- name: Build Android App
run: |
cd tests/apps/verify-${{ matrix.framework }}
briefcase create android
briefcase build android
briefcase package android --adhoc-sign
runner-os: [ 'macos-latest', 'windows-latest', 'ubuntu-latest' ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
framework: [ 'toga' ]
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +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.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<item
android:gravity="center"
android:drawable="@drawable/splash_image_box" />
</layer-list>
</layer-list>
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion {{ cookiecutter.safe_formal_name }}/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official

0 comments on commit b87cf0b

Please sign in to comment.