From 08379fc571519fc1a12840e54e4641f16b5ab49c Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Fri, 21 Aug 2020 17:03:43 +0700 Subject: [PATCH] Codecov (#1326) * Try codecov * Modify codecov steps * Strip out unused actions variables * Remove coverage.yml * Renamed test.yml to workflow.yml * Minor styling fix --- .github/workflows/coverage.yml | 2 -- .github/workflows/{test.yml => workflow.yml} | 9 +++++---- rq/scheduler.py | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 .github/workflows/coverage.yml rename .github/workflows/{test.yml => workflow.yml} (84%) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 47fcb28..0000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: Coveralls GitHub Action - uses: coverallsapp/github-action@v1.1.1 diff --git a/.github/workflows/test.yml b/.github/workflows/workflow.yml similarity index 84% rename from .github/workflows/test.yml rename to .github/workflows/workflow.yml index 4d38bb2..8ae68cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/workflow.yml @@ -38,8 +38,9 @@ jobs: - name: Test with pytest run: | - RUN_SLOW_TESTS_TOO=1 pytest --cov rq --durations=5 + RUN_SLOW_TESTS_TOO=1 pytest --cov=./ --cov-report=xml --durations=5 - - name: Codecov - run: | - codecov + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml \ No newline at end of file diff --git a/rq/scheduler.py b/rq/scheduler.py index e264956..17e2c5d 100644 --- a/rq/scheduler.py +++ b/rq/scheduler.py @@ -168,7 +168,7 @@ class RQScheduler(object): def stop(self): logger.info("Scheduler stopping, releasing locks for %s...", - ','.join(self._queue_names)) + ','.join(self._queue_names)) keys = [self.get_locking_key(name) for name in self._queue_names] self.connection.delete(*keys) self._status = self.Status.STOPPED @@ -200,7 +200,7 @@ class RQScheduler(object): def run(scheduler): logger.info("Scheduler for %s started with PID %s", - ','.join(scheduler._queue_names), os.getpid()) + ','.join(scheduler._queue_names), os.getpid()) try: scheduler.work() except: # noqa