Skip to content

Commit

Permalink
Merge pull request #55 from Zsailer/actions2
Browse files Browse the repository at this point in the history
Github Actions (round 2)
  • Loading branch information
Zsailer committed Sep 9, 2020
2 parents 78af624 + 98fd9f9 commit d2c19ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Jupyter Telemetry Unit Tests
name: Linter
on:
push:
branches: '*'
Expand All @@ -7,6 +7,8 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
architecture: 'x64'
- name: Install the Python dependencies
run: |
pip install -r dev-requirements
pip install -r dev-requirements.txt
pip install -e .
- name: Run the tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Telemetry

[![CircleCI](https://circleci.com/gh/jupyter/telemetry.svg?style=svg)](https://circleci.com/gh/jupyter/telemetry)
[![Tests](https://github.com/jupyter/telemetry/workflows/Jupyter%20Telemetry%20Unit%20Tests/badge.svg)](https://github.com/jupyter/telemetry/actions?query=workflow%3A%22Jupyter+Telemetry+Unit+Tests%22)
[![codecov](https://codecov.io/gh/jupyter/telemetry/branch/master/graph/badge.svg)](https://codecov.io/gh/jupyter/telemetry)
[![Documentation Status](https://readthedocs.org/projects/jupyter-telemetry/badge/?version=latest)](https://jupyter-telemetry.readthedocs.io/en/latest/?badge=latest)

Expand Down
11 changes: 4 additions & 7 deletions tests/test_register_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_record_event():
}


def test_register_schema_file():
def test_register_schema_file(tmp_path):
"""
Register schema from a file
"""
Expand All @@ -150,13 +150,10 @@ def test_register_schema_file():
el = EventLog()

yaml = YAML(typ='safe')
with tempfile.NamedTemporaryFile(mode='w') as f:
yaml.dump(schema, f)
f.flush()

f.seek(0)

el.register_schema_file(f.name)
schema_file = tmp_path.joinpath("schema.yml")
yaml.dump(schema, schema_file)
el.register_schema_file(str(schema_file))

assert schema in el.schemas.values()

Expand Down

0 comments on commit d2c19ff

Please sign in to comment.