test with commit hash #11
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: Run Docker Compose on Self-Hosted | |
on: | |
push: | |
branches: | |
- test_coopr_github_actions | |
pull_request: | |
branches: | |
- test_coopr_github_actions | |
workflow_dispatch: | |
jobs: | |
run-tasks: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
build-docker: | |
runs-on: self-hosted | |
needs: run-tasks | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set current commit | |
id: get_commit | |
run: echo "COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
- name: Update pyproject.toml for EDSL | |
run: | | |
cd /home/stefan/expectedparrot/coopr/backend | |
sed -i -E "s|edsl = \{git = \"https://github.com/expectedparrot/edsl.git\", rev = \".*\"\}|edsl = {git = \"https://github.com/expectedparrot/edsl.git\", rev = \"$COMMIT\"}|" pyproject.toml | |
- name: Run Docker Compose | |
run: | | |
cd /home/stefan/expectedparrot/coopr | |
docker-compose build --no-cache backend && docker-compose up --wait | |
run-make-coop-test: | |
runs-on: self-hosted | |
needs: build-docker | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Checkout EDSL at current commit | |
run: | | |
cd /home/stefan/expectedparrot/edsl | |
git fetch | |
git checkout $COMMIT | |
- name: Run make coop-test | |
run: | | |
cd /home/stefan/expectedparrot/edsl | |
source ./project/bin/activate | |
poetry install | |
make test-coop |