Skip to content

Proper state/error management for file ingestion #1184

Proper state/error management for file ingestion

Proper state/error management for file ingestion #1184

Workflow file for this run

name: general
on:
push:
branches:
- main
tags:
- v*.*.*
pull_request:
branches:
- main
jobs:
# Unit Testing
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Test software
run: make test
# End to End Testing
# It is powered by WebdriverIO, it requires an application binary path in our dist folder.
# See wdio.conf.ts capabilities attribute for more info.
test-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Build the application
run: make build
- name: Generate bundle file
run: make dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make AppImage executable
run: |
chmod a+x ./dist/*.AppImage
ls -l ./dist
- name: Check chrome version
run: google-chrome --version
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: npm run wdio
# Building Previews (on created pull requests)
# For GNU/Linux we need to build our application in the oldest version we want to support.
# https://pyinstaller.org/en/stable/usage.html?highlight=glibc#making-gnu-linux-apps-forward-compatible
# The reason we chose macos-13 as the minimum version:
# https://forums.developer.apple.com/forums/thread/739988
# "macOS 14 introduced a new container data protection feature. To learn more about that,
# see the link in Trusted Execution Resources.The solution here is to sign your code with a stable signing identity.
# For day-to-day development, that should be your Apple Development signing identity."
build:
if: github.event_name == 'pull_request'
strategy:
matrix:
os: [ubuntu-20.04, macos-13, windows-latest]
runs-on: ${{ matrix.os }}
needs: [test, test-e2e]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Build software
run: make build
- name: Dist software
run: make dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: distribution-files-${{ matrix.os }}
path: |
dist/*.deb
dist/*.exe
dist/*.dmg
retention-days: 14
# Releasing a Draft on Github (on merged pull requests)
# It will create or update a draft release on Github with all the artifacts we have built.
# The version in `package.json` needs to be updated to activate this action.
release:
if: github.event_name == 'push'
strategy:
matrix:
os: [ubuntu-20.04, macos-13, windows-latest]
runs-on: ${{ matrix.os }}
needs: [test, test-e2e]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Build software
run: make build
- name: Release software
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}