-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
283 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 18 * * *' | ||
|
||
concurrency: | ||
group: CI-tests-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
changes: | ||
# Check if any file related to Drain3/ CI behavior is changed | ||
# set outputs for other jobs to access for if conditions | ||
name: Check Changes | ||
runs-on: ubuntu-latest | ||
# To prevent error when there's no base branch | ||
if: github.event_name != 'schedule' | ||
timeout-minutes: 10 | ||
outputs: | ||
drain3: ${{ steps.filter.outputs.drain3 }} | ||
steps: | ||
- uses: actions/checkout@v3 # required for push event | ||
- name: Check for file changes | ||
uses: getsentry/[email protected] | ||
id: filter | ||
with: | ||
token: ${{ github.token }} | ||
# The following filters indicate a category along with | ||
# the files that should not be ignored by CI when modified. | ||
filters: | | ||
drain3: | ||
- '.github/**/*.yaml' | ||
- '**/*.py' | ||
- '**/Dockerfile*' | ||
- '**/Makefile' | ||
- 'tests/**' | ||
- '**/*.bat' | ||
- '**/*.sh' | ||
- '**/*.ps1' | ||
- '**/pyproject.toml' | ||
- '**/poetry.lock' | ||
- '**/*.cfg' | ||
- '**/*.ini' | ||
list-files: json # logs matched files | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [changes] | ||
if: | | ||
( always() && ! cancelled() ) && | ||
((github.event_name == 'schedule' && github.repository == 'logpai/drain3') || needs.changes.outputs.drain3 == 'true') | ||
strategy: | ||
matrix: | ||
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] | ||
fail-fast: false | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
|
||
steps: | ||
- name: Check out Drain3 codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup Poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade poetry | ||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Test with unittest | ||
run: poetry run python -m unittest discover --verbose --start-directory tests |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
**/__pycache__/* | ||
MANIFEST | ||
dist/* | ||
venv/* | ||
*venv/* | ||
.idea/* | ||
.vscode/* | ||
drain3.egg-info/* | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.