Skip to content

Commit

Permalink
Combine build and release, so we can test all in one go
Browse files Browse the repository at this point in the history
  • Loading branch information
amolenaar committed Feb 12, 2020
1 parent 59a6120 commit a084eb5
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 38 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/build.yml
Expand Up @@ -31,7 +31,7 @@ jobs:
pip install flake8==3.7.9
flake8 gaphor
test-linux:
linux:
needs: lint
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -68,7 +68,17 @@ jobs:
CC_TEST_REPORTER_ID: 05f6288b94a87daa172d3e96a33ec331a4374be7d01eb9a42b3b21c4c550a8ff
with:
coverageCommand: coverage xml
test-windows:
- name: Build
run: |
make translate
poetry build
- name: Publish to PyPI
if: github.event_name == "release"
run: |
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
windows:
needs: lint
runs-on: windows-latest
env:
Expand Down Expand Up @@ -103,7 +113,9 @@ jobs:
env:
CHERE_INVOKING: yes
PY_IGNORE_IMPORTMISMATCH: yes
test-macos:


macos:
needs: lint
runs-on: macOS-latest
env:
Expand Down Expand Up @@ -132,3 +144,19 @@ jobs:
pip install pytest-xvfb
- name: Test with Pytest
run: pytest
- name: Create macOS Binary
run: |
poetry build
cd macos-dmg
./package.sh
- name: Upload Assets
uses: actions/upload-artifact@v1
with:
name: Gaphor.dmg
path: macos-dmg/*dmg
- name: Upload Assets to release
uses: AButler/upload-release-assets@v2.0
if: github.event_name == "release"
with:
files: 'macos-dmg/*dmg;dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
35 changes: 0 additions & 35 deletions .github/workflows/release.yml
Expand Up @@ -43,38 +43,3 @@ jobs:
with:
files: 'win-installer/*.exe'
repo-token: ${{ secrets.GITHUB_TOKEN }}
upload-macos:
runs-on: macOS-latest
env:
PKG_CONFIG_PATH: /usr/local/Cellar/libffi/3.2.1/lib/pkgconfig:${PKG_CONFIG_PATH:-}
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install Dependencies
run: brew install gobject-introspection gtk+3 adwaita-icon-theme
- name: Install Poetry
uses: dschep/install-poetry-action@v1.3
with:
version: 1.0.2
- name: Use Python Dependency Cache
uses: actions/cache@v1.0.3
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-
- name: Install Python Dependencies
run: poetry install
- name: Build Wheel and sdist
run: poetry build
- name: Create macOS Binary
run: |
cd macos-dmg
./package.sh
- name: Upload Assets
uses: AButler/upload-release-assets@v2.0
with:
files: 'macos-dmg/*dmg;dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a084eb5

Please sign in to comment.