Skip to content

Commit

Permalink
ci: Add CI workflow for Minimap API
Browse files Browse the repository at this point in the history
This commit adds a new GitHub Actions workflow file, `minimap-main.yml`, which sets up continuous integration (CI) for the Minimap API. The workflow is triggered on push or pull request events for the main or develop branches. It also allows manual execution from the Actions tab.

The workflow consists of two jobs:
1. "linter" job runs linter checks using Python 3.10 on Ubuntu latest.
2. "tests_linux" job installs project dependencies and runs tests on Ubuntu latest.
3. "tests_win" job installs Pip, then installs and tests the project on Windows latest.

These changes ensure that code quality is maintained and tests are run automatically during development.
  • Loading branch information
SakuraIsayeki committed Jul 19, 2023
1 parent 149a431 commit 1786888
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/minimap-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Minimap API - CI

on:
# Triggers the workflow on push or pull request events but only for the main or develop branch
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
linter:
strategy:
fail-fast: false
matrix:
python-version: [3.10]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Change directory to subdirectory
run: cd wowskarma.api.minimap
- name: Install project dependencies
run: make install
- name: Run linter
run: make lint

tests_linux:
needs: linter
strategy:
fail-fast: false
matrix:
python-version: [3.10]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: make install
# with:
# fail_ci_if_error: true

tests_win:
needs: linter
strategy:
fail-fast: false
matrix:
python-version: [3.10]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Pip
run: pip install --user --upgrade pip
- name: Install project
run: pip install -e wowskarma.minimap.api/.

0 comments on commit 1786888

Please sign in to comment.