diff --git a/.github/workflows/github-actions-basic.yml b/.github/workflows/github-actions-basic.yml index 8470e85..30ade93 100644 --- a/.github/workflows/github-actions-basic.yml +++ b/.github/workflows/github-actions-basic.yml @@ -1,7 +1,10 @@ name: Python package on: [push] - +branches: + main + actions +#nagwa's file jobs: build: @@ -9,7 +12,7 @@ jobs: strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.9", "3.10","3.11"] steps: - uses: actions/checkout@v3 diff --git a/Chapter02/.github/workflows/github-actions-basic.yml b/Chapter02/.github/workflows/github-actions-basic.yml new file mode 100644 index 0000000..0b4c10e --- /dev/null +++ b/Chapter02/.github/workflows/github-actions-basic.yml @@ -0,0 +1,29 @@ +name: Python package +on: [push] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.9,3.10] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt;fi + - name: Lint with flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-sources --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: pytest + working-directory: Chapter02 + \ No newline at end of file diff --git a/Chapter02/testing/helper.py b/Chapter02/testing/helper.py index 9574fa8..b29c42d 100644 --- a/Chapter02/testing/helper.py +++ b/Chapter02/testing/helper.py @@ -6,7 +6,7 @@ from numpy.random import RandomState, SeedSequence rs = RandomState(MT19937(SeedSequence(123456789))) - +#edit # Define simulate ride data function def simulate_ride_data():