chore: update packages and cleanup code #1246
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
name: CI | |
on: [push] | |
jobs: | |
cleanup-runs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: rokroskar/[email protected] | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install | |
- name: Test with pytest | |
run: | | |
poetry run pytest | |
test-chart: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: "3.8.0" | |
- name: Test chart | |
run: | | |
helm repo add renku https://swissdatasciencecenter.github.io/helm-charts/ | |
helm dep update helm-chart/renku-gateway | |
helm lint helm-chart/renku-gateway --set oidcClientSecret=foo,gitlabClientSecret=bar,secretKey=foobar,cliClientSecret=barfoo,global.redis.host=test,global.core.versions.latest.name=v10,global.core.versions.latest.prefix=10 | |
- name: Build chart and images | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install | |
poetry run chartpress | |
publish-chart: | |
runs-on: ubuntu-latest | |
needs: test-chart | |
if: "startsWith(github.ref, 'refs/tags/')" | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: set up environment variables | |
run: | | |
echo "GIT_USER=Renku Bot" >> $GITHUB_ENV | |
echo "[email protected]" >> $GITHUB_ENV | |
- name: Push chart and images | |
uses: SwissDataScienceCenter/renku-actions/[email protected] | |
env: | |
CHART_NAME: renku-gateway | |
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }} | |
DOCKER_USERNAME: ${{ secrets.RENKU_DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }} | |
- name: Wait for chart to get published | |
run: sleep 120 | |
- name: Update component version | |
uses: SwissDataScienceCenter/renku-actions/[email protected] | |
env: | |
CHART_NAME: renku-gateway | |
GITHUB_TOKEN: ${{ secrets.RENKUBOT_GITHUB_TOKEN }} |