diff --git a/.github/workflows/github-actions.yaml b/.github/workflows/github-actions.yaml deleted file mode 100644 index eab1e35..0000000 --- a/.github/workflows/github-actions.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: GitHub Actions mock test -on: [pull_request] -jobs: - GitHub-Actions-mock-test: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.7", "3.10"] - steps: - - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "The ${{ github.repository }} repository has been cloned to the runner." - - 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 - if [ -f sriov/requirements.txt ]; then pip install -r sriov/requirements.txt; fi - pip install mock - - name: Run mock tests - run: | - pwd - python -m unittest sriov/common/test_utils_mock.py - - run: echo "This job's status is ${{ job.status }}." diff --git a/.github/workflows/mock.yaml b/.github/workflows/mock.yaml new file mode 100644 index 0000000..ea4ad1b --- /dev/null +++ b/.github/workflows/mock.yaml @@ -0,0 +1,23 @@ +name: Mock test +on: [pull_request, workflow_dispatch] +jobs: + mock-test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "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 + if [ -f sriov/requirements.txt ]; then pip install -r sriov/requirements.txt; fi + pip install mock + - name: Run mock tests + run: | + python -m unittest -v sriov/common/test_utils_mock.py +