Skip to content

Commit

Permalink
#252: Find and replace master for default branch change
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Sep 17, 2021
1 parent 87fbbeb commit f2f7794
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
jobs:
tests:
runs-on: ubuntu-16.04
Expand Down Expand Up @@ -244,10 +244,10 @@ jobs:
- name: Reinstall ICAT Server
run: cd /home/runner/install/icat.server; ./setup -vv install

- name: Checkout DataGateway API (master)
- name: Checkout DataGateway API (default branch)
uses: actions/checkout@v2
with:
ref: master
ref: ${{ github.event.repository.default_branch }}

- name: Create config.json
run: cp datagateway_api/config.json.example datagateway_api/config.json
Expand All @@ -256,10 +256,10 @@ jobs:

- name: Add dummy data to icatdb
run: poetry run python -m util.icat_db_generator
- name: Get SQL dump of dummy data from master's generator script
run: mysqldump -picatdbuserpw -uicatdbuser --skip-comments icatdb > ~/generator_script_dump_master.sql
- name: Get SQL dump of dummy data from main's generator script
run: mysqldump -picatdbuserpw -uicatdbuser --skip-comments icatdb > ~/generator_script_dump_main.sql

# Tests that the generator script produces the same data as is produced with master's version
# Tests that the generator script produces the same data as is produced with main's version

# NOTE: If a delibrate change is made to the script that will change the data generated,
# the diff (and therefore this job) will fail. If this is the case, don't be alarmed.
Expand All @@ -269,4 +269,4 @@ jobs:
# problem with the changes made that will make the generator script's data
# different to SciGateway preprod
- name: Diff SQL dumps
run: diff -s ~/generator_script_dump_master.sql ~/generator_script_dump_1.sql
run: diff -s ~/generator_script_dump_main.sql ~/generator_script_dump_1.sql
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Build Status](https://github.com/ral-facilities/datagateway-api/workflows/CI/badge.svg?branch=master)](https://github.com/ral-facilities/datagateway-api/actions?query=workflow%3A%22CI%22)
[![Codecov](https://codecov.io/gh/ral-facilities/datagateway-api/branch/master/graph/badge.svg)](https://codecov.io/gh/ral-facilities/datagateway-api)
[![Build Status](https://github.com/ral-facilities/datagateway-api/workflows/CI/badge.svg?branch=main)](https://github.com/ral-facilities/datagateway-api/actions?query=workflow%3A%22CI%22)
[![Codecov](https://codecov.io/gh/ral-facilities/datagateway-api/branch/main/graph/badge.svg)](https://codecov.io/gh/ral-facilities/datagateway-api)



Expand Down

0 comments on commit f2f7794

Please sign in to comment.