Skip to content

Commit

Permalink
Unify GitHub actions into one workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lordmauve committed Mar 2, 2021
1 parent 447f008 commit a636d19
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/wheels.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,38 @@
name: "Build Wheels"
name: "Test, Build, Publish"

on:
workflow_dispatch:
push:
release:
types:
- published
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install xvfb
run: |
sudo apt-get install xvfb
- name: Run tests under xvfb
run: |
xvfb-run --auto-servernum python setup.py test
- name: Cleanup xvfb pidx
uses: bcomnes/cleanup-xvfb@v1
- uses: actions/upload-artifact@master
if: ${{ failure() }}
with:
name: failed-image
path: test/failed-image

buildpackage:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/pythonapp.yml

This file was deleted.

7 changes: 6 additions & 1 deletion pgzero/soundfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ def riff_walk(f, offset):

def identify(path):
f = MagicReader(path)
if f.read_bytes(0) != b'RIFF':
magic = f.read_bytes(0)

if magic == b'OggS':
return "Ogg Vorbis"

if magic != b'RIFF':
return 'Unknown format (not RIFF WAVE)'

if f.read_bytes(8) != b'WAVE':
Expand Down

0 comments on commit a636d19

Please sign in to comment.