fix error #6
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: Build and Test | |
on: | |
push: | |
branches: [ playwright-testing ] | |
pull_request: | |
branches: [ playwright-testing ] | |
jobs: | |
lint: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: | |
- 3.11 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
- name: Test installing development dependencies | |
working-directory: deployment/docker | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
#- name: Run Flake8 test | |
# run: flake8 . | |
django_test: | |
needs: lint | |
name: 'Django Test' | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: | |
- 3.11 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build test image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: deployment/docker/Dockerfile | |
push: false | |
load: true | |
- name: Run docker-compose services | |
working-directory: . | |
run: | | |
cp .example.env .env | |
sed -i 's/context: deployment\/docker-s3-bucket/context: .\n dockerfile: .\/deployment\/docker-s3-bucket\/Dockerfile/' docker-compose.yml | |
docker compose build | |
docker compose up -d db; sleep 180; docker compose up -d | |
- name: Test django endpoint | |
run: | | |
curl http://localhost:61122/ | |
if [ $? -ne 0 ]; then | |
echo "Curl command failed" | |
exit 1 | |
fi | |
- name: Update dependencies | |
working-directory: ./playwright/ci-test | |
run: npm install | |
- name: Install exact dependencies | |
working-directory: ./playwright/ci-test | |
run: npm ci | |
- name: Install Playwright Browsers | |
working-directory: ./playwright/ci-test | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
working-directory: ./playwright/ci-test | |
run: npx playwright test | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright/ci-test/playwright-report/ | |
retention-days: 30 |