Highlight current language in dropdown #333
Workflow file for this run
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: SIPA CI | |
on: [push, pull_request] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- uses: pre-commit/[email protected] | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Fix permissions | |
run: sudo chmod -R a+rw . | |
- name: Build the Docker image | |
run: docker build -t sipa:latest . | |
- name: Login to GitLab Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: registry.agdsn.de | |
username: "github-actions" | |
password: ${{ secrets.GITLAB_REGISTRY_PASSWORD }} | |
- name: Tag built image | |
run: docker tag sipa:latest registry.agdsn.de/agdsn/coreos/sipa/sipa:${GITHUB_REF##*/} | |
- name: Push to GitLab registry | |
run: docker push registry.agdsn.de/agdsn/coreos/sipa/sipa:${GITHUB_REF##*/} | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out sipa and submodules | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: print information about pip cache | |
run: pip cache info && pip cache list | |
- name: ensure presence of `wheel` | |
run: pip install wheel | |
- name: install pip dependencies | |
run: > | |
pip install | |
-r build/requirements/requirements.txt | |
-r build/requirements/requirements_testing.txt | |
id: pip-install | |
# now come the tests | |
- name: Run tests | |
run: > | |
pytest | |
--junitxml=junit/test-results.xml | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() # always run even if the previous step fails | |
with: | |
report_paths: 'junit/test-*.xml' |