fix(deps): update to React 19 #1562
Workflow file for this run
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: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
pull_request_target: | |
types: [opened, synchronize, reopened, labeled] | |
jobs: | |
code_tests: | |
name: Code tests | |
if: github.event_name != 'pull_request_target' | |
runs-on: ubuntu-22.04 | |
env: | |
NIX_BUILD_SHELL: bash | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup | |
- name: Run tests | |
run: nix-shell --command "scripts/test.sh" | |
integration_tests: | |
name: Integration tests | |
if: github.event_name != 'pull_request_target' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-14, macos-15, ubuntu-22.04] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup | |
- name: Setup git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Example" | |
- name: Create test project | |
run: | | |
scripts/script-create-django-app.sh --name integration | |
# - name: Setup tmate session | |
# if: ${{ failure() }} | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Run tests | |
run: | | |
cd integration | |
nix-shell --command "python manage.py generate_client_assets" | |
nix-shell --command "python manage.py build" | |
nix-shell --command "scripts/test.sh --all" | |
nix-shell --command "scripts/remove_example.sh" | |
nix-shell --command "python manage.py generate_client_assets" | |
nix-shell --command "python manage.py build" | |
nix-shell --command "scripts/test.sh --all" | |
website_tests: | |
name: Website tests | |
runs-on: ubuntu-22.04 | |
if: | | |
github.event_name == 'push' || | |
(github.event_name == 'pull_request_target' && | |
(github.repository_owner == github.actor || contains(github.event.pull_request.labels.*.name, 'website'))) | |
steps: | |
- name: Remove website label | |
if: contains(github.event.pull_request.labels.*.name, 'website') | |
run: | | |
curl --silent --fail \ | |
-X DELETE \ | |
-H 'Accept: application/vnd.github.v3+json' \ | |
-H 'Authorization: token ${{ github.token }}' \ | |
'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels/website' | |
- uses: actions/checkout@v3 | |
if: github.event_name == 'push' | |
with: | |
fetch-depth: 0 | |
- uses: actions/checkout@v3 | |
if: github.event_name == 'pull_request_target' | |
with: | |
fetch-depth: 0 | |
# See: https://github.com/actions/checkout/issues/518 | |
ref: "refs/pull/${{ github.event.number }}/merge" | |
- uses: ./.github/actions/setup | |
- name: Run tests | |
run: | | |
cd website | |
nix-shell --command "python manage.py generate_client_assets" | |
nix-shell --command "scripts/test.sh --all" | |
- name: Run build | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
run: | | |
cd website | |
scripts/deploy.sh --build-only | |
docker_tests: | |
name: Docker tests | |
if: github.event_name != 'pull_request_target' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/setup | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
# Note that we do not log in for tests, as forks cannot access credentials | |
- name: "Prepare docker context" | |
run: scripts/build-create-django-app-docker.sh | |
- name: Build and push | |
uses: docker/build-push-action@v2 | |
with: | |
context: website_build_context | |
platforms: linux/amd64,linux/arm64 | |
file: website_build_context/Dockerfile | |
push: false | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: silviogutierrez/reactivated:ci |