-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from infra-blue/fixedpipeline
fix: fixed some errors in the pipeline
- Loading branch information
Showing
3 changed files
with
16 additions
and
63 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Create and publish a Docker image | |
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "main" | ||
|
||
jobs: | ||
build: | ||
|
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,51 +1,42 @@ | ||
name: DMI_bot_deploy | ||
name: Development pipeline | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths-ignore: | ||
- ".gitignore" | ||
- "README.md" | ||
- "docs/**" | ||
pull_request: | ||
branches: [master] | ||
paths-ignore: | ||
- ".gitignore" | ||
- "README.md" | ||
- "docs/**" | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies for requirements and testing | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi | ||
- name: Lint with flake8 | ||
- name: Setup environment | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
mv config/settings.yaml.dist config/settings.yaml | ||
- name: Lint with pylint | ||
run: | | ||
pylint main.py setup.py module | ||
# - name: Setup enviroment | ||
pylint main.py module | ||
# - name: Test with pytest | ||
# run: | | ||
# mv config/settings.yaml.dist config/settings.yaml | ||
# mv data/DMI_DB.db.dist data/DMI_DB.db | ||
# python3 setup.py useless_token --test_api_id ${{secrets.API_ID}} \ | ||
# --test_api_hash ${{secrets.API_HASH}} --test_session ${{secrets.SESSION}} \ | ||
# --test_tag ${{secrets.TEST_TAG}} --test_token ${{secrets.TEST_TOKEN}} \ | ||
# --test_representatives_group ${{secrets.TEST_USER_ID}} --test_dev_group_chatid ${{secrets.TEST_USER_ID}} | ||
- name: Unit test | ||
run: pytest tests/unit/ | ||
# - name: End-to-end test | ||
# run: pytest tests/e2e/ | ||
# pytest tests/unit/ |