DLSR-4: remove library survey (#1219) #1003
This file contains hidden or 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: Run CI Suite | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| stylelint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f | |
| - uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea | |
| - run: yarn install --frozen-lockfile | |
| - run: yarn run lint | |
| rspec: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Docker Compose | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y docker-compose | |
| - name: Login to DockerHub | |
| uses: docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Start and Initialize Docker services | |
| run: | | |
| docker-compose run web bundle install | |
| docker-compose up --detach | |
| docker-compose run web bundle exec rails db:setup | |
| docker-compose ps | |
| - name: run rspec | |
| run: docker-compose run web bundle exec rspec spec | |
| - name: Stop docker services | |
| run: docker-compose down | |
| cypress: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # <--- fetch full git history required by Chromatic | |
| persist-credentials: true | |
| - name: Set up Docker Compose | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y docker-compose | |
| - name: Login to DockerHub | |
| uses: docker/login-action@f3364599c6aa293cdc2b8391b1b56d0c30e45c8a | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Start and Initialize Docker services | |
| run: | | |
| docker-compose run web bundle install | |
| docker-compose run web yarn install --frozen-lockfile | |
| docker-compose up --detach | |
| docker-compose run web bundle exec rails db:setup | |
| - uses: cypress-io/github-action@v6 | |
| with: | |
| working-directory: e2e | |
| browser: chrome | |
| - name: Run Chromatic | |
| working-directory: e2e | |
| env: | |
| CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| ELECTRON_EXTRA_LAUNCH_ARGS: --remote-debugging-port=9222 | |
| run: npx chromatic --cypress --project-token=$CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes | |
| - name: Stop docker services | |
| run: docker-compose down |