Skip to content

chore(deps): update dependency ubuntu to v24 #1049

chore(deps): update dependency ubuntu to v24

chore(deps): update dependency ubuntu to v24 #1049

Workflow file for this run

name: Cypress
on:
- push
- workflow_dispatch
jobs:
main:
name: Cypress
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: プッシュされたブランチ名を取得する
id: get_branch_name
run: |
echo "::set-output name=branch_name::${GITHUB_REF#refs/heads/}"
echo "branch_name: ${GITHUB_REF#refs/heads/}"
- name: 環境の確認(ローカルの act で実行時に分岐を行うため)
id: this_environment
# act 環境では hostname が docker-desktop になる
run: |
echo "::set-output name=hostname::$(hostname)"
echo "hostname: $(hostname)"
- name: ステップ内で定義した変数の確認
run: |
echo "branch_name: ${{ steps.get_branch_name.outputs.branch_name }}"
echo "hostname: ${{ steps.this_environment.outputs.hostname }}"
- name: (ローカル実行時)$ sudo apt update
if: ${{ steps.this_environment.outputs.hostname == 'docker-desktop' }}
run: |
sudo apt update
- name: (ローカル実行時)Node.js と Yarn をインストールする
if: ${{ steps.this_environment.outputs.hostname == 'docker-desktop' }}
run: |
curl -sSL "https://nodejs.org/dist/v16.13.1/node-v16.13.1-linux-x64.tar.xz" | sudo tar --strip-components=2 -xJ --overwrite -C /usr/local/bin/ node-v16.13.1-linux-x64/bin/node
curl https://www.npmjs.com/install.sh | sudo bash
npm install -g yarn
- name: Cypress の実行に必要なパッケージをインストールする
run: |
lib/github_actions_scripts/install_packages_for_cypress.sh
- name: Firefox をインストールする
run: |
lib/github_actions_scripts/install_firefox.sh
which firefox
# - name: Microsoft Edge をインストールする
# run: |
# lib/github_actions_scripts/install_microsoft_edge.sh
- uses: actions/[email protected]
with:
path: .cache/yarn
key: ${{ runner.os }}-yarn-cache-cache-yarn-v1
- uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-yarn-cache-node-modules-v1
- name: $ yarn install
run: |
yarn install
- name: Cypress を実行する(Webにデータを記録する)
if: ${{ steps.get_branch_name.outputs.branch_name == 'main' || steps.get_branch_name.outputs.branch_name == 'development' }}
run: |
npx cypress run --parallel --browser firefox --record --key ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Cypress を実行する(Webにデータを記録しない)
if: ${{ steps.get_branch_name.outputs.branch_name != 'main' && steps.get_branch_name.outputs.branch_name != 'development' }}
run: |
npx cypress run --browser firefox --record false