Skip to content

Commit

Permalink
ci: only run on pushes to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Oct 22, 2023
1 parent a4675e4 commit 2b5b7b1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Build CI Img
on:
# Push includes PR merge
push:
branches:
- main
branches: [main]
paths:
# Workflow is triggered only if deps change
- "pyproject.toml"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Build

on:
push:
tags:
- "*"
tags: ["*"]
# Allow manual trigger
workflow_dispatch:

Expand Down
26 changes: 9 additions & 17 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,17 @@ name: pytest
on:
# Run tests on all pushed branches
push:
branches:
- "*"
# Run tests on PR, prior to merge to main & development.
branches: [main]
# Run tests on PR, prior to merge to main & development
pull_request:
branches:
- main
branches: [main]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
environment:
name: "test"
container:
image: ghcr.io/hotosm/osm-fieldwork:ci

steps:
- uses: actions/checkout@v4
- name: Run pytest
run: |
pytest
pytest:
uses: hotosm/gh-workflows/.github/workflows/test_pytest.yml@main
with:
image_name: ghcr.io/${{ github.repository }}
build_args: |
COMMIT_REF=${{ github.sha }}

0 comments on commit 2b5b7b1

Please sign in to comment.