diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..718520c --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,30 @@ +name: Pre-commit + +on: + pull_request: + branches: [main] + +concurrency: + group: "lint" + cancel-in-progress: false + +jobs: + pre-commit: + name: Pre-Commit + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install Poetry Package + working-directory: 01OS + run: | + pip install --upgrade pip + pip install poetry==1.3.2 + poetry config virtualenvs.create false + poetry install --no-interaction --with dev + - name: Run Pre-commit + run: pre-commit run --all-files diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2d800c..3d347cc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,21 @@ -name: Pre-commit +name: Run Test on: - pull_request: - branches: [main] + # pull_request: + # branches: [main] + push: concurrency: group: "test" cancel-in-progress: false jobs: - pre-commit: - name: Pre-Commit + pytest: + name: Run Test runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11"] steps: - name: Checkout uses: actions/checkout@v4 @@ -27,4 +31,5 @@ jobs: poetry config virtualenvs.create false poetry install --no-interaction --with dev - name: Run Pre-commit - run: pre-commit run --all-files + working-directory: 01OS + run: pytest test