Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable CI workflows that need re-work #187

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions .github/workflows/assignments_test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: assignments_test
on: [push, pull_request]
jobs:
run_assignments:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
# name: assignments_test
# on: [push, pull_request]
# jobs:
# run_assignments:
# runs-on: ubuntu-latest
# if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name

steps:
- name: Checkout the repository
uses: actions/checkout@v3
# steps:
# - name: Checkout the repository
# uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# distribution: 'zulu'
# java-version: 17

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
# - name: Setup python
# uses: actions/setup-python@v4
# with:
# python-version: 3.8

- name: Clone cse1110/assignments
uses: actions/checkout@v3
with:
repository: 'cse1110/assignments'
path: 'assignments'
# - name: Clone cse1110/assignments
# uses: actions/checkout@v3
# with:
# repository: 'cse1110/assignments'
# path: 'assignments'

- name: Compile Andy
run: |
mvn -f andy/pom.xml clean package -Djar.finalName=andy -Dmaven.test.skip && mv andy/target/andy.jar /home/runner/work/andy/
# - name: Compile Andy
# run: |
# mvn -f andy/pom.xml clean package -Djar.finalName=andy -Dmaven.test.skip && mv andy/target/andy.jar /home/runner/work/andy/

- name: Execute python script
run: |
python ./.github/scripts/assignments_test.py
# - name: Execute python script
# run: |
# python ./.github/scripts/assignments_test.py
74 changes: 37 additions & 37 deletions .github/workflows/assignments_test_docker.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
name: assignments_test_docker
on: push
jobs:
run_assignments_docker:
runs-on: ubuntu-latest
# name: assignments_test_docker
# on: push
# jobs:
# run_assignments_docker:
# runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3
# steps:
# - name: Checkout the repository
# uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
# - name: Setup python
# uses: actions/setup-python@v4
# with:
# python-version: 3.8

- name: Clone cse1110/assignments
uses: actions/checkout@v3
with:
repository: 'cse1110/assignments'
path: 'assignments'
# - name: Clone cse1110/assignments
# uses: actions/checkout@v3
# with:
# repository: 'cse1110/assignments'
# path: 'assignments'

- name: Clone cse1110/weblab-docker-v2
uses: actions/checkout@v3
with:
repository: 'cse1110/weblab-docker-v2'
path: 'weblab-docker-v2'
ssh-key: ${{ secrets.DOCKER_REPO_DEPLOY_KEY }}
persist-credentials: false
# - name: Clone cse1110/weblab-docker-v2
# uses: actions/checkout@v3
# with:
# repository: 'cse1110/weblab-docker-v2'
# path: 'weblab-docker-v2'
# ssh-key: ${{ secrets.DOCKER_REPO_DEPLOY_KEY }}
# persist-credentials: false

- name: Configure Dockerfile
working-directory: ./weblab-docker-v2
run: |
sed -i -E 's|git clone .+|git clone -n ${{ github.server_url }}/${{ github.repository }}.git|; s|(RUN mvn clean package.*)|RUN git checkout ${{ github.sha }}\n\1|' Dockerfile
# - name: Configure Dockerfile
# working-directory: ./weblab-docker-v2
# run: |
# sed -i -E 's|git clone .+|git clone -n ${{ github.server_url }}/${{ github.repository }}.git|; s|(RUN mvn clean package.*)|RUN git checkout ${{ github.sha }}\n\1|' Dockerfile

- name: Build Docker image
working-directory: ./weblab-docker-v2
run: |
make
# - name: Build Docker image
# working-directory: ./weblab-docker-v2
# run: |
# make

- name: Execute python script
env:
COMMIT_HASH: ${{ github.sha }}
run: |
python ./.github/scripts/assignments_test_docker.py
# - name: Execute python script
# env:
# COMMIT_HASH: ${{ github.sha }}
# run: |
# python ./.github/scripts/assignments_test_docker.py
54 changes: 27 additions & 27 deletions .github/workflows/tests_docker.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: tests_docker
on: push
jobs:
run_tests_docker:
runs-on: ubuntu-latest
# name: tests_docker
# on: push
# jobs:
# run_tests_docker:
# runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v3
# steps:
# - name: Checkout the repository
# uses: actions/checkout@v3

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.8
# - name: Setup python
# uses: actions/setup-python@v4
# with:
# python-version: 3.8

- name: Clone cse1110/weblab-docker-v2
uses: actions/checkout@v3
with:
repository: 'cse1110/weblab-docker-v2'
path: 'weblab-docker-v2'
ssh-key: ${{ secrets.DOCKER_REPO_DEPLOY_KEY }}
persist-credentials: false
# - name: Clone cse1110/weblab-docker-v2
# uses: actions/checkout@v3
# with:
# repository: 'cse1110/weblab-docker-v2'
# path: 'weblab-docker-v2'
# ssh-key: ${{ secrets.DOCKER_REPO_DEPLOY_KEY }}
# persist-credentials: false

- name: Configure Dockerfile
working-directory: ./weblab-docker-v2
run: |
sed -i -E 's|git clone .+|git clone -n ${{ github.server_url }}/${{ github.repository }}.git|; s|RUN mvn clean package.*|RUN git checkout ${{ github.sha }}\nRUN mvn test|; s|RUN mv .+||' Dockerfile
# - name: Configure Dockerfile
# working-directory: ./weblab-docker-v2
# run: |
# sed -i -E 's|git clone .+|git clone -n ${{ github.server_url }}/${{ github.repository }}.git|; s|RUN mvn clean package.*|RUN git checkout ${{ github.sha }}\nRUN mvn test|; s|RUN mv .+||' Dockerfile

- name: Run tests in Docker
working-directory: ./weblab-docker-v2
run: |
make
# - name: Run tests in Docker
# working-directory: ./weblab-docker-v2
# run: |
# make
52 changes: 26 additions & 26 deletions .github/workflows/weblab-tests.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: weblab_tests
on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'
jobs:
run_weblab:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
# name: weblab_tests
# on:
# workflow_dispatch:
# schedule:
# - cron: '0 6 * * *'
# jobs:
# run_weblab:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout the repository
# uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: 17

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
# - name: Cache Maven packages
# uses: actions/cache@v3
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2

- name: Run WebLab Selenium tests
env:
WEBLAB_CREDENTIALS: ${{ secrets.WEBLAB_CREDENTIALS }}
WEBLAB_SELENIUM_HEADLESS: true
run: mvn -f andy/pom.xml -B test --file pom.xml -Dtest="selenium/*"
# - name: Run WebLab Selenium tests
# env:
# WEBLAB_CREDENTIALS: ${{ secrets.WEBLAB_CREDENTIALS }}
# WEBLAB_SELENIUM_HEADLESS: true
# run: mvn -f andy/pom.xml -B test --file pom.xml -Dtest="selenium/*"