-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
58 additions
and
0 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,58 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
tags: | ||
- "*" | ||
|
||
pull_request: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
python-version: [3.12] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install --no-cache-dir -r requirements.txt | ||
pip install --no-cache-dir -r requirements_dev.txt | ||
pip list | ||
- name: Lint with Flake8 | ||
run: | | ||
flake8 --exclude=tests/* --ignore=E501 | ||
- name: Test with pytest | ||
run: | | ||
python -m pytest -r sx | ||
- name: Report coverage with Codecov | ||
if: github.event_name == 'push' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Extract tag name | ||
shell: bash | ||
run: echo "##[set-output name=imagetag;]$(echo ${GITHUB_REF##*/})" | ||
id: extract_tag_name | ||
|
||
- name: Build Uproot Image | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: sslhep/servicex_replica_distance_service:${{ steps.extract_tag_name.outputs.imagetag }} | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} |