Skip to content

Commit

Permalink
Reorder tasks in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
moomoohk committed Nov 24, 2022
1 parent 29d344e commit b49e823
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,8 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Generate a common hashseed for all tests
generate-hashseed:
runs-on: ubuntu-latest

outputs:
hashseed: ${{ steps.generate.outputs.hashseed }}

steps:
- name: Generate Hashseed
id: generate
run: |
python -c "import os
from random import randint
hashseed = randint(0, 4294967295)
print(f'{hashseed=}')
open(os.environ['GITHUB_OUTPUT'], 'a').write(f'hashseed={hashseed}')"

# Run flake8 linter
flake8:
runs-on: ubuntu-latest

Expand All @@ -58,6 +43,23 @@ jobs:
pip install flake8
flake8 setup.py dpath/ tests/
# Generate a common hashseed for all tests
generate-hashseed:
runs-on: ubuntu-latest

outputs:
hashseed: ${{ steps.generate.outputs.hashseed }}

steps:
- name: Generate Hashseed
id: generate
run: |
python -c "import os
from random import randint
hashseed = randint(0, 4294967295)
print(f'{hashseed=}')
open(os.environ['GITHUB_OUTPUT'], 'a').write(f'hashseed={hashseed}')"
# Tests job
tests:
# The type of runner that the job will run on
Expand Down

0 comments on commit b49e823

Please sign in to comment.