Skip to content

Commit

Permalink
Add ci configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcantrell committed Jan 17, 2024
1 parent eef5d08 commit fefe063
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .builds/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
image: archlinux
packages:
- python
- python-pip
sources:
- https://git.sr.ht/~jmcantrell/swaystatus
tasks:
- setup: |
cd swaystatus
python -m venv venv
. ./venv/bin/activate
pip install --upgrade pip
pip install --requirement=requirements/{production,development}.txt
pip install --editable=.
- test: |
cd swaystatus
. ./venv/bin/activate
pytest
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Run tests'

on:
workflow_dispatch:
push:
branches:
- main
pull_request:

permissions:
contents: read
pull-requests: read

concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Create venv
run: |
python -m venv venv
- name: Install dependencies
run: |
. ./venv/bin/activate
pip install --upgrade pip
pip install --requirement=requirements/{production,development}.txt
pip install --editable=.
- name: Execute test runner
run: |
. ./venv/bin/activate
pytest

0 comments on commit fefe063

Please sign in to comment.