88 lines
3.1 KiB
YAML
88 lines
3.1 KiB
YAML
name: Gitea Actions
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
on: [push]
|
|
|
|
jobs:
|
|
Run-Tests-On-Amd64:
|
|
runs-on: amd64
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
|
- name: Clean Up
|
|
run: |
|
|
if [[ $(docker ps -q|wc -l) -gt 0 ]]
|
|
then
|
|
docker ps -aq | xargs docker rm -f
|
|
fi
|
|
#docker system prune -af --volumes
|
|
- name: Init
|
|
run: |
|
|
make make-init ENVS="ENV=ci TAG=latest"
|
|
make docker-compose-init-test
|
|
- name: Build Images
|
|
run: |
|
|
make docker-compose-build
|
|
- name: Run Server
|
|
run: |
|
|
make docker-compose-up
|
|
- name: Load Data
|
|
run: |
|
|
docker exec -i psc_ci-mongodb-1 /usr/bin/mongorestore --archive < ./dev_db/mongodb.dump
|
|
- name: Run Composer Install
|
|
run: |
|
|
chmod -R 0777 src/new
|
|
make composer ARGS="install"
|
|
- name: Run Tests
|
|
run: |
|
|
make test
|
|
- name: Clean Up
|
|
run: |
|
|
make clean
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
Run-Tests-On-Arm64:
|
|
runs-on: arm64
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
|
- name: Clean Up
|
|
run: |
|
|
if [[ $(docker ps -q|wc -l) -gt 0 ]]
|
|
then
|
|
docker ps -aq | xargs docker rm -f
|
|
fi
|
|
#docker system prune -af --volumes
|
|
- name: Init
|
|
run: |
|
|
make make-init ENVS="ENV=ci TAG=latest"
|
|
make docker-compose-init-test
|
|
- name: Build Images
|
|
run: |
|
|
make docker-compose-build
|
|
- name: Run Server
|
|
run: |
|
|
make docker-compose-up
|
|
- name: Load Data
|
|
run: |
|
|
docker exec -i psc_ci-mongodb-1 /usr/bin/mongorestore --archive < ./dev_db/mongodb.dump
|
|
- name: Run Composer Install
|
|
run: |
|
|
chmod -R 0777 src/new
|
|
make composer ARGS="install"
|
|
- name: Run Tests
|
|
run: |
|
|
make test
|
|
- name: Clean Up
|
|
run: |
|
|
make clean
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|