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

Use Shared CI Workflows #63

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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"
66 changes: 18 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,28 @@ 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
uses: beeware/.github/.github/workflows/pre-commit-run.yml@main
with:
pre-commit-source: "pre-commit"

verify-apps:
name: Build apps
needs: pre-commit
uses: beeware/.github/.github/workflows/app-build-verify.yml@main
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-json
- id: check-xml
- id: check-case-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
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