finished docs #192
This file contains hidden or 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: Test parts | |
on: [push] | |
jobs: | |
proxy: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: add domain to /etc/hosts | |
run: | | |
sudo echo "172.18.0.30 ${{ secrets.DOMAIN }}" | sudo tee -a /etc/hosts | |
- name: setup certs | |
working-directory: ./certs | |
run: | | |
chmod +x generate-ci-certs.sh && ./generate-ci-certs.sh ${{ secrets.DOMAIN }} | |
- name: Run proxy | |
run: DOMAIN=${{ secrets.DOMAIN }} docker compose -f ./dev-compose.yml up -d --build | |
- name: Get Dev dependencies | |
run: | | |
chmod +x install-system-dev-dependencies.sh && \ | |
./install-system-dev-dependencies.sh | |
- name: Run tests | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_seconds: 40 | |
retry_wait_seconds: 30 | |
max_attempts: 3 | |
command: cd ./proxy && chmod +x test.sh && DOMAIN=${{ secrets.DOMAIN }} PATH=$HOME/go-binaries/bin:$PATH ./test.sh | |
database: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run database | |
run: docker compose -f ./dev-compose.yml up -d --build db | |
- name: Test status | |
timeout-minutes: 1 | |
run: | | |
chmod +x check-postgres-status-for-ci.sh && \ | |
./check-postgres-status-for-ci.sh | |
jobs-server-lint: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go 1.23.5 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.5' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.64 | |
working-directory: ./server/jobsServer | |
jobs-server-tests: | |
runs-on: ubuntu-24.04 | |
needs: jobs-server-lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run services | |
run: | | |
docker compose -f ./dev-compose.yml up -d --build jobs-server && \ | |
docker compose -f ./dev-compose.yml up -d --build api | |
- name: Get Dev dependencies | |
run: | | |
chmod +x install-system-dev-dependencies.sh && \ | |
./install-system-dev-dependencies.sh | |
- name: Run tests | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_seconds: 40 | |
retry_wait_seconds: 30 | |
max_attempts: 3 | |
command: cd ./server/jobsServer && chmod +x test.sh && PATH=$HOME/go-binaries/bin:$PATH HOST="0.0.0.0" ./test.sh | |
api-lint: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go 1.23.5 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.5' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.64 | |
working-directory: ./server/restAPI | |
api-go-tests: | |
runs-on: ubuntu-24.04 | |
needs: api-lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go 1.23.5 | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.5' | |
- name: setup | |
working-directory: ./server/restAPI | |
run: | | |
go mod download && | |
go mod verify | |
- name: build | |
working-directory: ./server/restAPI | |
run: go build | |
- name: Run Golang tests | |
working-directory: ./server/restAPI | |
run: go test ./test | |
api-usage-tests: | |
runs-on: ubuntu-24.04 | |
needs: api-lint | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup api usage tests | |
run: | | |
docker compose -f ./dev-compose.yml up -d --build jobs-server && \ | |
docker compose -f ./dev-compose.yml up -d --build api | |
- name: Get Dev dependencies | |
run: | | |
chmod +x install-system-dev-dependencies.sh && \ | |
./install-system-dev-dependencies.sh | |
- name: run api usage tests | |
working-directory: ./server/restAPI/test | |
run: | | |
chmod +x usage-tests.sh && \ | |
PATH=$HOME/go-binaries/bin:$PATH HOST="0.0.0.0" ./usage-tests.sh | |
worker: | |
name: Run worker tests python-${{ matrix.version }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '3.12' | |
- '3.11' | |
- '3.10' | |
os: | |
- ubuntu-22.04 | |
- ubuntu-22.04-arm | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.version }} | |
- name: install dependencies | |
working-directory: ./server/worker | |
run: | | |
pip install -r requirements.txt -r dev-requirements.txt | |
- name: Run tox checks | |
working-directory: ./server/worker | |
run: tox | |
janitor: | |
name: Run janitor tests python-${{ matrix.version }} ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '3.12' | |
- '3.11' | |
- '3.10' | |
os: | |
- ubuntu-22.04 | |
- ubuntu-22.04-arm | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.version }} | |
- name: install dependencies | |
working-directory: ./janitor | |
run: | | |
pip install -r dev-requirements.txt | |
- name: Run tox checks | |
working-directory: ./janitor | |
run: tox |