Merge branch 'master' of https://github.com/UniversityOfHelsinkiCS/mo… #2536
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: Staging | |
on: | |
push: | |
branches: [master] | |
jobs: | |
test_competition: | |
name: "Test competition" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/competition_spec.js | |
test_dictionary: | |
name: "Test dictionary" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/dictionary_spec.js | |
test_flashcards: | |
name: "Test flashcards" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/flashcards_spec.js | |
test_follow_and_block: | |
name: "Test follow and block" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/follow_and_block_spec.js | |
test_groups: | |
name: "Test groups" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/groups_spec.js | |
test_mobvita: | |
name: "Test mobvita" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/mobvita_spec.js | |
test_practice: | |
name: "Test practice" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/practice_spec.js | |
test_tests: | |
name: "Test tests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/tests_spec.js | |
test_wordnest: | |
name: "Test wordnest" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Run tests' | |
uses: ./.github/actions/run_test | |
with: | |
spec: cypress/e2e/wordnest_spec.js | |
build: | |
name: 'Publish to dockerhub' | |
needs: | |
- test_competition | |
- test_dictionary | |
- test_flashcards | |
- test_follow_and_block | |
- test_groups | |
- test_mobvita | |
- test_practice | |
- test_tests | |
- test_wordnest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Publish to DockerHub | |
uses: docker/[email protected] | |
with: | |
repository: toska/mobvita | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
build_args: ENVIRONMENT=staging,REVITA_URL=https://revita-test.cs.helsinki.fi/api,COMMIT_HASH=${{ github.sha }} | |
tags: staging | |
sentry: | |
name: "Sentry" | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Pull image and create a container | |
run: docker create --name mobvita toska/mobvita:staging | |
- name: Copy assets from the container | |
run: docker cp mobvita:usr/src/app/dist ./app | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_URL: https://toska.cs.helsinki.fi/ | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: toska | |
SENTRY_PROJECT: mobvita | |
with: | |
environment: staging | |
set_commits: 'skip' | |
sourcemaps: ./app | |
url_prefix: '~/app' |