Skip to content
Snippets Groups Projects
Commit a762dbcc authored by Johannes Zumthurm's avatar Johannes Zumthurm
Browse files

remove .github and artefacts

parent 50bb157d
No related branches found
No related tags found
1 merge request!677Gitlab ci
Pipeline #287487 passed
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
all:
patterns:
- "*"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
groups:
eve:
patterns:
- "eve"
- "flask"
- "pymongo"
test:
patterns:
- "pytest*"
- "tox"
- "flake8"
name: CD
on:
workflow_run:
workflows: [CI]
branches: [master]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
container: amiveth/service-update-helper:latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
matrix:
deploy-url:
- https://deploy-cluster.amiv.ethz.ch
- https://deploy-fallback.amiv.ethz.ch
deploy-service:
- amivapi
- amivapi-cron
- amivapi-dev
- amivapi-dev-cron
exclude:
- deploy-url: 'https://deploy-fallback.amiv.ethz.ch'
deploy-service: 'amivapi-dev'
- deploy-url: 'https://deploy-fallback.amiv.ethz.ch'
deploy-service: 'amivapi-dev-cron'
env:
CI_DEPLOY_URL: ${{ matrix.deploy-url }}
CI_DEPLOY_SERVICE: ${{ matrix.deploy-service }}
CI_DEPLOY_TOKEN: ${{ secrets.CI_DEPLOY_TOKEN }}
steps:
- run: /update.py
name: CI
on:
schedule:
- cron: '5 4 * * 1'
push:
branches: [ master ]
pull_request:
jobs:
test:
# Due to drop of out-of-the-box support in ubuntu-22.04 for MongoDB 5.0,
# we cannot use ubuntu-latest. have to consider this in the future. as ubuntu-20.04 will be OBSOLETE in 2025.
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.10','3.12']
services:
mongodb:
image: mongo:5.0.14
env:
MONGO_INITDB_DATABASE: amivapi
options: >-
--health-cmd mongo
--health-start-period 20s
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions setuptools
- name: Create MongoDB User
run: mongo test_amivapi --eval 'db.createUser({user:"test_user",pwd:"test_pw",roles:["readWrite"]});'
- name: Test with tox
run: tox
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
fail_ci_if_error: true
verbose: true
build:
runs-on: ubuntu-latest
needs: test
env:
IMAGE_NAME: amiveth/amivapi
steps:
- uses: actions/checkout@v4
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
# Login against a Docker registry except on PR
- name: Log into Docker Hub registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: type=raw,value=latest
# Build and push Docker image with Buildx (don't push on PR)
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
pull: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
......@@ -14,9 +14,6 @@ test:
- pip install tox
script:
- tox
artifacts:
paths:
- ./coverage.xml
build_master:
stage: build
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment