Skip to content

feat(load): add comms_backup reader for SMS Backup & Restore XML #202

feat(load): add comms_backup reader for SMS Backup & Restore XML

feat(load): add comms_backup reader for SMS Backup & Restore XML #202

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.12']
aw-server: ["aw-server", "aw-server-rust"]
aw-version: ["v0.12.3b14"]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up ActivityWatch
uses: ActivityWatch/setup-action@v3
with:
aw-server: ${{ matrix.aw-server }}
aw-version: ${{ matrix.aw-version }}
aw-testing: false
fakedata: true
- name: Install poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install deps
run: poetry install
- name: Run tests
run: |
make test SLOW=true
- name: Upload coverage
run: |
bash <(curl -s https://codecov.io/bash)
typecheck:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12']
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install deps
run: poetry install
- name: Run typecheck
run: |
make typecheck
notebooks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.10'
aw-server: "aw-server-rust"
aw-version: "master"
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up ActivityWatch
uses: ActivityWatch/setup-action@v3
if: ${{ matrix.aw-version != 'master' }}
with:
aw-server: ${{ matrix.aw-server }}
aw-version: ${{ matrix.aw-version }}
aw-testing: false
fakedata: true
- name: Download aw-server-rust nightly
uses: dawidd6/action-download-artifact@v6
if: ${{ matrix.aw-server == 'aw-server-rust' && matrix.aw-version == 'master' }}
with:
repo: ActivityWatch/aw-server-rust
workflow: build.yml
workflow_conclusion: "completed"
branch: master
event: push
name: binaries-Linux
path: aw-server-rust
- name: Run aw-server-rust nightly
shell: bash
if: ${{ matrix.aw-server == 'aw-server-rust' && matrix.aw-version == 'master' }}
run: |
chmod +x ./aw-server-rust/debug/aw-server
./aw-server-rust/debug/aw-server &
- name: Insert fake data into aw-server-rust
shell: bash
if: ${{ matrix.aw-server == 'aw-server-rust' && matrix.aw-version == 'master' }}
env:
AW_TESTING: true
run: |
pip install git+https://github.com/ActivityWatch/aw-client.git
wget --no-verbose -O fakedata.py https://github.com/ActivityWatch/aw-fakedata/raw/63a357dbc7b8b832ec44cc55cafd6622ce909590/aw_fakedata.py
python3 fakedata.py
- name: Install poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install deps
run: poetry install
- name: Build notebooks
env:
aw_server: ${{ matrix.aw-server }}
aw_version: ${{ matrix.aw-version }}
run: |
make notebooks
mkdir notebooks/output/$aw_server
mv notebooks/output/*.html notebooks/output/$aw_server/
- name: Upload notebooks
uses: actions/upload-artifact@v4
with:
name: notebooks
path: notebooks/output
- name: Echo logs
if: ${{ always() }}
run: |
cat $HOME/.cache/activitywatch/log/aw-server-rust/*
deploy:
runs-on: ubuntu-latest
needs: [notebooks]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: notebooks
path: dist
- name: Display structure of downloaded files
run: ls -R
- run: |
mv dist/aw-server-rust/* dist/
rmdir dist/aw-server-rust
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages
folder: dist
token: ${{ secrets.GITHUB_TOKEN }}