Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
upgrade cypress, edit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sang2925 committed Nov 15, 2022
1 parent c668831 commit 5274cc2
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 30 deletions.
44 changes: 29 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,21 @@ on:
- '**'

jobs:

prepare:
runs-on: ubuntu-20.04
outputs:
uuid: ${{ steps.uuid.outputs.value }}
steps:
- name: Generate unique ID 💎
id: uuid
run: echo "{name}={sha-$GITHUB_SHA-time-$(date +"%s")}" >> $GITHUB_ENV

- name: Print unique ID 🖨`
run: echo "generated id ${{ steps.uuid.outputs.value }}"

install:
needs: ['prepare']
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -40,7 +54,7 @@ jobs:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node18.12.0-chrome106-ff106
needs: install
needs: [prepare, install]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -74,17 +88,17 @@ jobs:
parallel: true
config-file: cypress.config.js
spec: src/integration/e2e/redteam/**/**/**/*.cy.js
ci-build-id: ${{ needs.prepare.outputs.uuid }}
env:
CYPRESS_PROJECT_ID: 'rsybgk'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY_RED }}

RedTeamFirefox:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node18.12.0-chrome106-ff106
options: --user 1001
needs: install
needs: [prepare, install]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -117,21 +131,21 @@ jobs:
parallel: true
config-file: cypress.config.js
spec: src/integration/e2e/redteam/**/**/**/*.cy.js
ci-build-id: ${{ needs.prepare.outputs.uuid }}
env:
CYPRESS_PROJECT_ID: 'rsybgk'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY_RED1 }}

BlueTeamChrome:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node18.12.0-chrome106-ff106
options: --user 1001
needs: install
needs: [prepare, install]
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -160,17 +174,17 @@ jobs:
parallel: true
config-file: cypress.config.js
spec: src/integration/e2e/blueteam/**/*.cy.js
ci-build-id: ${{ needs.prepare.outputs.uuid }}
env:
CYPRESS_PROJECT_ID: 'rsybgk'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: '46ahz3'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY_BLUE }}

BlueTeamFirefox:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node18.12.0-chrome106-ff106
options: --user 1001
needs: install
needs: [prepare, install]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -203,7 +217,7 @@ jobs:
parallel: true
config-file: cypress.config.js
spec: src/integration/e2e/blueteam/**/*.cy.js
ci-build-id: ${{ needs.prepare.outputs.uuid }}
env:
CYPRESS_PROJECT_ID: 'rsybgk'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_PROJECT_ID: '46ahz3'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY_BLUE1 }}
1 change: 0 additions & 1 deletion applications/redeye-e2e/cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
projectId: 'rsybgk',
fixturesFolder: './src/fixtures',
modifyObstructiveCode: false,
video: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Selecting Host Via Graph', () => {
//Host Win-10-02
cy.get('[cy-test=graphNode]').eq(2).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER03');

Expand All @@ -24,7 +24,7 @@ describe('Selecting Host Via Graph', () => {
if (Cypress.isBrowser('firefox')) {
cy.get('[cy-test=graphNode]').eq(1).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER03');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Testing of graph', () => {
if (Cypress.isBrowser({ family: 'chromium' })) {
cy.get('[cy-test=graphNode]').eq(1).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER02');

Expand All @@ -24,7 +24,7 @@ describe('Testing of graph', () => {
if (Cypress.isBrowser('firefox')) {
cy.get('[cy-test=graphNode]').eq(0).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER02');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Selecting Host Via Graph', () => {
//Host Win-10-02
cy.get('[cy-test=graphNode]').eq(2).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER03');

Expand All @@ -24,7 +24,7 @@ describe('Selecting Host Via Graph', () => {
if (Cypress.isBrowser('firefox')) {
cy.get('[cy-test=graphNode]').eq(1).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER03');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Testing of graph', () => {
if (Cypress.isBrowser({ family: 'chromium' })) {
cy.get('[cy-test=graphNode]').eq(1).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER02');

Expand All @@ -24,7 +24,7 @@ describe('Testing of graph', () => {
if (Cypress.isBrowser('firefox')) {
cy.get('[cy-test=graphNode]').eq(0).click({ force: true });

cy.wait(500);
cy.wait(1000);

cy.get('[cy-test=header]').should('contain.text', 'COMPUTER02');

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"barrelsby": "^2.3.0",
"builder-util": "^23.0.2",
"cross-env": "^7.0.3",
"cypress": "^11.0.1",
"cypress": "^11.1.0",
"cypress-multi-reporters": "^1.6.1",
"dotenv": "^8.2.0",
"eslint": "^8.22.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8319,9 +8319,9 @@ __metadata:
languageName: node
linkType: hard

"cypress@npm:^11.0.1":
version: 11.0.1
resolution: "cypress@npm:11.0.1"
"cypress@npm:^11.1.0":
version: 11.1.0
resolution: "cypress@npm:11.1.0"
dependencies:
"@cypress/request": ^2.88.10
"@cypress/xvfb": ^1.2.4
Expand Down Expand Up @@ -8367,7 +8367,7 @@ __metadata:
yauzl: ^2.10.0
bin:
cypress: bin/cypress
checksum: 417763449c0688d45506eb492431c87d9fbc3ce6e0690c386533b2319081cf9c41672ce6f35c056fccf2aa045bf9592c46349d3d508908d188f65c4f43069c54
checksum: ee0097778cf3cdf3854325cabf19a60a7486d46ae70082034c05b22b203f21ff85a4871c08dadc6641be649a64c739a443dd3f2d6a5ab112fc9ead703e1f1be3
languageName: node
linkType: hard

Expand Down Expand Up @@ -17065,7 +17065,7 @@ __metadata:
cors: ^2.8.5
cross-env: ^7.0.3
crypto-js: ^4.0.0
cypress: ^11.0.1
cypress: ^11.1.0
cypress-multi-reporters: ^1.6.1
d3: ^6.7.0
dotenv: ^8.2.0
Expand Down

0 comments on commit 5274cc2

Please sign in to comment.