refactor: add nginx debug headers (compose) #691
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: CI | |
on: [push] | |
jobs: | |
preflight-fe: | |
runs-on: ubuntu-latest | |
name: Frontend preflight | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- run: npm install -g yarn | |
- run: yarn install --dev | |
- run: yarn lint | |
preflight-be: | |
runs-on: ubuntu-latest | |
name: Backend preflight | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- run: pip install black | |
- run: black --version | |
- run: black ./obr_core/ --check | |
- run: pip install poetry==1.2.2 | |
- run: poetry install --no-cache | |
- run: poetry run ruff check obr_core/ | |
test-be: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.11', '3.12'] | |
name: Backend tests (python ${{ matrix.python-version }}) | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: 'x64' | |
- run: pip install poetry==1.2.2 | |
- run: poetry install --no-cache | |
- run: poetry run make test-be | |
test-fe: | |
runs-on: ubuntu-latest | |
name: Frontend tests | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Europe/Zurich" | |
- run: npm install -g yarn | |
- run: yarn install --dev | |
- run: yarn test:unit | |
test-e2e: | |
runs-on: ubuntu-latest | |
name: E2E tests | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- run: npm install -g yarn | |
- run: yarn install | |
- run: yarn build | |
- run: pip install poetry==1.2.2 | |
- run: poetry install --no-cache | |
- run: poetry run make test-e2e | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: e2e-test-screenshots | |
path: screenshots | |
release: | |
needs: [preflight-fe, preflight-be, test-be, test-fe, test-e2e] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'chore(release):') | |
steps: | |
# https://mestrak.com/blog/semantic-release-with-python-poetry-github-actions-20nn | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- uses: actions/checkout@v3 | |
- name: Semantic release | |
run: | | |
pip install python-semantic-release==7.28.1 | |
git config user.name github-actions | |
git config user.email [email protected] | |
git fetch --prune --tags | |
git tag -l | |
semantic-release publish -v DEBUG |