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

Merge Github workflows files into test.yml #3362

Merged
merged 6 commits into from
Jan 24, 2024
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
66 changes: 0 additions & 66 deletions .github/workflows/admin.yml

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/docs.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/functional.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/lint.yml

This file was deleted.

127 changes: 125 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ permissions:
contents: read

jobs:
chore:
lint:
name: Lint and check format
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- name: make lint
run: make lint

unit-test:
name: Unit Tests
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -95,7 +108,7 @@ jobs:

coveralls:
name: Coveralls Finished
needs: chore
needs: unit-test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
Expand All @@ -107,3 +120,113 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls --service=github --finish


functional:
name: Functional
needs: lint
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- name: Print environment
run: |
python --version
pip --version

- name: Install dependencies
run: |
make install-dev
make install-postgres

- name: Create database
env:
PGPASSWORD: postgres
run: |
psql -c "CREATE DATABASE testdb ENCODING 'UTF8' TEMPLATE template0;" -U postgres -h localhost

- name: Start Kinto
run: |
make runkinto & sleep 5

- name: Functional Tests
run: |
make functional

kinto-admin:
name: Kinto Admin
needs: [lint, functional]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- uses: actions/setup-node@v4
with:
node-version: "18.x"

- name: Print environment
run: |
python --version
pip --version
node --version
npm --version

- name: geckodriver/firefox
run: |
echo "geckodriver/firefox"
which geckodriver
geckodriver --version
which firefox
firefox --version

- name: make build-kinto-admin
run: make build-kinto-admin

- name: Install dependencies
run: make install-dev

- name: Start Kinto
run: .venv/bin/kinto start --ini tests/browser.ini & sleep 5

- name: Browser Tests
run: make browser-test

docs:
name: Validate docs
needs: lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- name: Print environment
run: |
python --version
pip --version

- name: make docs
run: make docs

- name: Package description
run: make test-description
Loading
Loading