Update mkdocs github action #74
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: [ main ] | |
pull_request: | |
branches: [ main ] | |
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: Run Flake8 test | |
# run: flake8 . | |
App_test: | |
needs: lint | |
name: 'App 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 | |
working-directory: docker | |
run: ./build.sh | |
- name: Run docker-compose services | |
working-directory: docker | |
run: | | |
./compose.py --compose-file docker-compose.yml --compose-file docker-compose.dev.yml up | |
sleep 60 | |
docker exec saeoss-ckan-web-1 poetry run ckan db init | |
docker exec saeoss-ckan-web-1 poetry run ckan db upgrade --plugin saeoss | |
docker exec saeoss-ckan-web-1 poetry run ckan user add user [email protected] name=admin password=12345678 | |
docker exec saeoss-ckan-web-1 poetry run ckan sysadmin add admin | |
- name: Test App endpoint | |
run: | | |
curl http://localhost:5000 | |
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@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright/ci-test/playwright-report/ | |
retention-days: 30 |